I need to get a script to run over 100 of different files in a folder.
The current input file is:
(However the input file has to change by one counter each loop of the script(e.g. 001, 002, 003...))
At the end of the scrip the current output is:
It should also increase by 1 counter after each loop (to match the input files increase.
So after the script finished all gif files in the folder it should have produced as many XXXoutput.gifs as there were input gifs to begin with.
Since I can't state an exact number it should repeat this for all files in the folder.
we have one script which we use to send mail in our environment. If we are giving correct attachment script runs fine but if we give a attachment name which is not present on server then this script go to infinite loop and causing all memory to be used. could any one please suggest me what is wrong... (2 Replies)
There's probably a better way to do what I'm doing and if so, let me know an alternative.
I have a script that runs rsh for every entry in a txt file to go get the file size off the remote server. I then compare the remote size with a local size.
My script worked fine until recently when I... (2 Replies)
Hello Experts-
We are facing some issues in the while loop script when we use the script time to decide whether to exist from the loop or continue.
Below is the script
SrcExitLoop="FALSE"
Src_InitialStartTime=`date +%s`
Src_StartTime=`date +%s`
Src_NUM_ALERTS=0
TOTAL_ALERTS=`expr <SOME... (4 Replies)
I am having problem looping this script
I want to give the user option to decide if they want to continue after each entry but then also loop it back to beginning so they can more to content of there testcase they just created. I fam new to scripting so loops are little tricky for me.
code I... (7 Replies)
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
I am trying to write a script that loops through all the files in the current directory that end in '.slg.gz' and runs a parser on each file. Here is my code:
#!/bin/bash
FILES_HOME = 'dirname $0'
for i in $(ls $FILES_HOME/.slg.gz$);do
./run-feature-parser $(i) > OUTPUT.csv
done ... (1 Reply)
I have a bunch of files named publish.php within subdirs. I need to append a line at the end of each file. I thought I could do it with find and echo like this:
find . -name publish.php -exec echo "<? include('path/to/file.php'); ?>" >> '{}' \;
but that appends the line to a file named {}... (2 Replies)
If I have a file with a bunch of various numbers in one column, how can I make a script to take each number in the file and put in into a command line?
Example:
cat number_file
2
5
8
11
13
34
55
I need a loop to extract each of these numbers and put them into a command line... (1 Reply)
I am trying to get the follow script to run in the background on the 'fly'. I can launch it via cron and it will run in the background. BUT when I launch it from the command line it will run in the foreground. I figure it has to do with the while loop I have, but I have no clue how I can run the... (8 Replies)