[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Help With School Assignment, Learning Bash Scripts
From: |
nick |
Subject: |
Re: [Help-bash] Help With School Assignment, Learning Bash Scripts |
Date: |
Fri, 07 Nov 2014 13:22:52 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
I agree with you guys about this don't worry. I do kernel and embedded
programming so the ways he
teaches us our terrible, I am actually teaching most of my fellow students more
then he does.
Cheers and Thanks,
Nick
On 14-11-07 08:46 AM, Greg Wooledge wrote:
> On Fri, Nov 07, 2014 at 02:39:23PM +0100, Eric Blake wrote:
>> On 11/07/2014 02:05 PM, Greg Wooledge wrote:
>>> On Thu, Nov 06, 2014 at 05:18:00PM -0500, nick wrote:
>>>> Here is my code so far:
>>>> !/bin/bash
>>>> shopt -s extglob nullglob
>>>> dir=$1
>>>> for file in "$dir"/!*(.old)
>>>> do
>>>> [[ $file == *.old ]] || mv -- "$file" "$file.old"
>>>> done
>>>
>>> The extended glob is not quite right. If you want to match "all files
>>> except those that end with .old" it should be "$dir"/!(*.old) instead.
>>
>> But what about dot files?
>
> Add dotglob to the shopt line.
>
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, (continued)
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eduardo A . Bustamante López, 2014/11/05
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eric Cook, 2014/11/05
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eduardo A . Bustamante López, 2014/11/05
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, nick, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eduardo A . Bustamante López, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, nick, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/07
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eric Blake, 2014/11/07
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/07
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts,
nick <=
- Message not available
- Message not available
- Message not available
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/11
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, nick, 2014/11/11
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/11
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, nick, 2014/11/06
Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Jesse Molina, 2014/11/05