1
vote
0answers
50 views

repeat command until process start or timeout unix

Is there anyway to check the number of file in a directory, if the number of files is correct, say 5 files, zip the files with zip -r total.zip. If the number of files is wrong, wait 3 seconds, and ...
0
votes
1answer
41 views

Excute for loop in subfolder

I have this command : for i in $(svn st | grep \! | awk '{print $2}'); do svn delete $i; done I would like to execute it to a subfolder without making a cd command. Is it possible ? Thanks !
2
votes
2answers
385 views

Bash script 'while read' loop causes 'broken pipe' error when run with GNU Parallel

According to the GNU Parallel mailing list this is not a GNU Parallel-specific problem. They suggested that I post my problem here. The error I'm getting is a "broken pipe" error, but I feel I ...
1
vote
1answer
449 views

Loops in Bash for creating sequentially numbered folders

How would I write a BASH script that creates directories test0-test63? I'm thinking something along the lines of: for x in range (64) mkdir ./test'x'
0
votes
1answer
668 views

Bash Script for loop that is breaking lines up instead of using the whole line

I am writing a very simple script and I'm getting stuck on something stupid. Basically I have text file in which each line is comprised of 3 words separated by a space. When you cat the file it ...
0
votes
3answers
725 views

Loop through a directory unix shell programming

Use a for loop to go through the filenames in the directory. In this version, only loop through the filenames that do not have a ".old" extension Inside the loop, rename the file to the new name. ...
2
votes
1answer
1k views

Bash Shell Scripting - How to iterate through files and directories, and copy and rename files?

I have a directory setup as follows: /Group1/audiofile1.wav /Group1/audiofile2.wav /Group1/audiofile3.wav /Group1/audiofile4.wav /Group2/audiofile1.wav /Group2/audiofile2.wav /Group3/audiofile1.wav ...
2
votes
2answers
2k views

Bash Shell Script with Menu

I've written a bash shell script (code provided below) that gives the user 4 options. However I'm having a little trouble with the code. Right now when they select option 3, to show the date. It loops ...