|
From: | nick |
Subject: | Re: [Help-bash] Help With School Assignment, Learning Bash Scripts |
Date: | Thu, 06 Nov 2014 22:09:14 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
It seems to work but my school's server complains like this. Files created in 'testdir': file1 file2.old file3old file4.old Execution of 'oldfiles2 testdir': 'oldfiles2 testdir' incorrectly produced some output or errors: Here is the script as I copied: #!/bin/bash for file in $(ls -1 "$1" | grep -v '\.old$'); do mv "$file" "$file.old" done On 14-11-06 06:38 PM, Eduardo A. Bustamante López wrote: > #!/bin/bash > # BROKEN BROKEN > for file in $(ls -1 "$1" | grep -v '\.old$'); do > mv "$file" "$file.old" > done > # BROKEN BROKEN
[Prev in Thread] | Current Thread | [Next in Thread] |