Computing.Net > Forums > Unix > csh if syntax chk multiple files

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

csh if syntax chk multiple files

Reply to Message Icon

Original Message
Name: kamalpreet
Date: December 5, 2008 at 08:16:49 Pacific
Subject: csh if syntax chk multiple files
OS: Solaris
CPU/Ram: Ultra 60
Manufacturer/Model: Solaris/ULTRA 60
Comment:

what is the correct syntax in CSH for checking files like
if { -e F1 AND (F2 OR F3)} then
##
endif

Warm Regards
Kamalpreet Singh


Report Offensive Message For Removal


Response Number 1
Name: nails
Date: December 6, 2008 at 10:38:40 Pacific
Reply:


#!/bin/csh

if ( -e F1 && ( -e F2 || -e F3 ) ) then
echo "file F1 and (F2 or F3) exist"
endif


Report Offensive Follow Up For Removal







Use following form to reply to current message:

Not Logged In!

You will not be able to post.

Register | Login
   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: csh if syntax chk multiple files  

Comments:



Results for: csh if syntax chk multiple files

Check Multiple File Exists
    Summary: Hi, I want to use Shell Script to check multiple file exists and then execute other tasks, I use the following compound condition, but neither succeed. if [ -e check_fin_bbb.complete ] && [ -e fin_bbb...
www.computing.net/answers/unix/check-multiple-file-exists/4775.html

break large file into multiple file
    Summary: I'd like to have a script that breaks a large file into multiple files. Basicaly, the script reads a large file and looking for a line "PJL EOJ", if line found, the counter will count it as 1, so when...
www.computing.net/answers/unix/break-large-file-into-multiple-file/5410.html

gzip multiple files into one
    Summary: Hi, How to gzip multiple files into one .gz file. Ex: I have 3 files - a1.txt a2.txt a3.txt I want to zip them into aall.gz and later when I unzip, it should unzip into a1.txt, a2.txt a3.txt. I tried ...
www.computing.net/answers/unix/gzip-multiple-files-into-one/7121.html








Which MP3 player do you have?

iPod/iPhone
Zune
Something Else
None


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History






Data Recovery Software