Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I exclude a range in ksh IF statement

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
In the following code,I want to exclude files in the range FROM TO ;
eg
FROM=AAABBBC
TO=AAABBBH
for file in ls
do
if [[ $file >= FROM && $file <= $TO ]]
then
ignore
else
process
fi
done
 
Perhaps something like this:
Code:
if [[ $file < $FROM || $file > $TO ]]
then
  process
else
  ignore
fi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top