Check file sequence script not working. Need help.
I have a script to check a file sequence for missing frames. It used to work in true Unix but now on OSX 10.6.4 (bash) it reports every frame is missing. Hopefully someone here can help. ---------- Post updated at 09:32 AM ---------- Previous update was at 09:30 AM ----------
Oh yeah, one more thing the file sequences are named like this:
"BT_103_v23.00139.dpx"
Last edited by Scott; 03-31-2011 at 02:43 PM..
Reason: Please use code tags for code, not quote tags - and that's C-Shell, not Bash :)
You're certainly not running it in bash, not sure why you mention it at all.
I see nothing in that code which would have ever added leading zeroes to your strings.
There's plenty of things in your script which in a bourne shell would be "useless use of ls *" and the like but in csh these constructs may actually be necessary...
But whether your shell be csh or zsh or whatever you can't exit -1, that value's nonsensical. It has to be a positive value between 0-255 inclusive.
Most of us aren't too fluent in CSH for a variety of reasons which cts already linked. You'd do better to learn a real scripting language. Trying a solution in bash for you.
I surmise that the version of csh you used to use had these :r etc string operations. Mine certainly doesn't and may be what broke down when you brought this script over.
---------- Post updated at 10:42 AM ---------- Previous update was at 09:49 AM ----------
Last edited by Corona688; 04-25-2011 at 05:28 PM..
Reason: Moved TOTAL++ to simplify code
Hi All,
I have a requirement that i need to list only the missing sequences with a unix script.
For Example:
Input:
FILE_001.txt
FILE_002.txt
FILE_005.txt
FILE_006.txt
FILE_008.txt
FILE_009.txt
FILE_010.txt
FILE_014.txt
Output:
FILE_003.txt
FILE_004.txt
FILE_007.txt
FILE_011.txt... (5 Replies)
Hello i have question that i want check syntax from my script shell with sh -n filename
but it's not show something even i have wrong syntax in my file. why can this happened or any other way to check it?
i use on header of file :
#!/bin/sh
thx before :) (7 Replies)
Hello,
I am running Solaris 8. When issuing the command "stty lcase" all text which is output to the terminal are capitalized. Letters that are supposed to be capitals are preceded by a backslash during output. All text which is input is converted to lower case. This is the expected behaviour... (5 Replies)
I want to listed files every hours and check the missing sequence
my file format is
CV.020220131430.txt
CV.020220131440.txt
CV.020220131450.txt
CV.ddmmyyhhm.txt
how to check if i have missing files in sequence ..
thanks (3 Replies)
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Hi everyone,
I need help in creating a script that would check if the file sequence is in order in a particular directory. These are log files that are generated throughout the day.
Example of the file name will be, ABC01_YYMMDDHHMM###### (ABC01_0904161829000001)
Sometimes the file... (4 Replies)
Hi,
if I have a lot of files like (AABBCC0010, AABBCC0011, AABBCC0012....AABBCC1000), can I write a small script to check any sequence number jump and show me the result which sequence number?
#The first sequence may start from 0010 or 0101... :confused:
Thank you!! (10 Replies)
I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit.
Logically, I'm looking for the best way to approach this
Thanks for any assistance in advance.
Note: I'm using a C shell and... (2 Replies)