UNIX Find command in Borne Shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting UNIX Find command in Borne Shell
# 1  
Old 04-06-2006
UNIX Find command in Borne Shell

I need to perform two separate commands as part of the -exec section of a find command. Is this possible?
# 2  
Old 04-06-2006
Use two -exec sequences instead.
find . -name x\* -exec ls -ld {} \; -exec cksum {} \;

But this requires that the first command succeed (exit with 0) or the 2nd will not run. This more complex sequence does not require that...
find . -name x\* \( -exec ls -ld {} \; -o -exec cksum {} \; \)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I am getting strange message when run borne shell script

I have a code: if then#{ process daily files for file in *_${Today}*.csv *_${Today}*.txt do if || then echo "This file will be processed in separate script" continue fi if ;then ... (2 Replies)
Discussion started by: digioleg54
2 Replies

2. Shell Programming and Scripting

Little bit weired : Find files in UNIX w/o using find or where command

Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same. Thanks in advance. Regards Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies

3. UNIX for Dummies Questions & Answers

borne shell script

I need anwser to this qestion! I havewirte a script that provides line numbered contents of a file which must make use of the following control structures files Command line arguments I am a complete new commer to unix and bourne shell scripting can any one help (1 Reply)
Discussion started by: migg-21
1 Replies

4. Shell Programming and Scripting

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (0 Replies)
Discussion started by: bosskr
0 Replies

5. Shell Programming and Scripting

Documenattion on Borne And C shell programming

Hi experts, I am new bee in unix programming. How to differenciate a Borne and C shell programming. Can i write a C shell syntax in Borne again shell. Please send me the good links on Borne and Cshell programming . Any help in this regard will be highly appreciated. Regards, Azaz. (3 Replies)
Discussion started by: azazalis
3 Replies

6. UNIX for Dummies Questions & Answers

Where can I find the best Unix Shell?

I am new and I would like to know your opinion on the best Unix shell for linux? :confused: (4 Replies)
Discussion started by: faron17
4 Replies

7. UNIX for Dummies Questions & Answers

Need Help With My First Borne Shell Program

I'm working on writing my very first borne shell program and I need some help. I think I'm pretty close to having this correct but I may be off. I think my actual program is coded correctly but the commands I use within it I think are what's throwing it off? **Purpose of the program: To... (3 Replies)
Discussion started by: FuzzyNips
3 Replies

8. Shell Programming and Scripting

how to find a file in UNIX without find command?

given a start directory,a filename,how to find it? (3 Replies)
Discussion started by: bluo
3 Replies

9. Shell Programming and Scripting

Can there be multi-dimensional variable arrays in borne shell?

Hello - I've serached the web but can't find much on array script variables (except that C-shell variables are arrays!) I'm trying to form a 2-D string array: (this is what I want, but in java) String list = { {"one", "two"}, {"three"} }; I know this is a 1-D string array shell... (4 Replies)
Discussion started by: jparker
4 Replies

10. UNIX for Dummies Questions & Answers

Modifying from borne shell to C shell

Just want to know a few conversion tricks. in Borne Shell, I have the line: if test -s testmap then ... fi ## testmap is a filename and I wanna test whether it exists ## then do whatever How can I convert that to C Shell? I've tried: if (test -s testmap) then ... endif but it... (3 Replies)
Discussion started by: zenkisoft
3 Replies
Login or Register to Ask a Question