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
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)
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)
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,
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 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)
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)
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)
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)
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)
Discussion started by: Arun1992
5 Replies
LEARN ABOUT REDHAT
ran2tiff
RAN2TIFF(1) General Commands Manual RAN2TIFF(1)NAME
ran2tiff - expose and convert a RADIANCE animation to TIFF frames
SYNOPSIS
ran2tiff [ -W prev_frame_wt ][ -H histo ][ -D dir ] [ pcond opts ] [ ra_tiff opts ] frame1.hdr frame2.hdr ..
DESCRIPTION
Ran2tiff takes an animated sequence of Radiance pictures and converts them by calling pcond(1) and ra_tiff(1) in such a way that exposure
changes gradually from one frame to the next. It accomplishes this by computing a histogram for each image and blending it with a weighted
histogram from the previous frame, where the weight is set by the -W option, or 0.9 by default. A value of 0.5 would mean that the previ-
ous frame carries 1/2 the weight of the current one, and the frame before that 1/4, 1/8 before that, and so on.
The -H option specifies a histogram file to be used to ensure continuous exposure between the current sequence and one before it. If the
file does not exist, it will be created at the end of the conversion. If it does exist, its contents will be used as the histogram at the
end of the previous sequence.
The -D option may be used to specify an output directory for the resulting TIFF frames. Otherwise, the current directory will be used.
The output file names will correspond to the input names, but with a ".tif" suffix.
Ran2tiff also accepts the standard options for pcond and ra_tiff, though output to LogLuv TIFF formats is not supported. (There would be
no point in adjusting the exposure if the output were HDR.)
EXAMPLE
To convert a sequence of frames using a rapid human exposure response and LZW compression on the output:
ran2tiff -W 0.7 -h -z frame*.hdr
Similar to fieldcomb(1), this program works well with the "TRANSFER" facility of ranimate(1).
AUTHOR
Greg Ward
SEE ALSOfieldcomb(1), getinfo(1), pcond(1), pfilt(1), phisto(1), ra_tiff(1), ranimate(1), rpict(1)RADIANCE 9/16/2005 RAN2TIFF(1)