The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
borne shell script migg-21 UNIX for Dummies Questions & Answers 1 02-26-2007 12:54 AM
Documenattion on Borne And C shell programming azazalis Shell Programming and Scripting 3 07-09-2006 09:56 AM
Need Help With My First Borne Shell Program FuzzyNips UNIX for Dummies Questions & Answers 3 11-04-2004 07:09 PM
Can there be multi-dimensional variable arrays in borne shell? jparker Shell Programming and Scripting 4 05-15-2002 04:47 PM
Modifying from borne shell to C shell zenkisoft UNIX for Dummies Questions & Answers 3 04-26-2001 04:18 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-06-2006
marshaferry marshaferry is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 1
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 (permalink)  
Old 04-06-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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 {} \; \)
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0