![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running two commands in one line | rdns | UNIX for Dummies Questions & Answers | 4 | 04-27-2009 12:04 PM |
| how to delete text from line starting pattern1 up to line before pattern2? | repudi8or | Shell Programming and Scripting | 5 | 04-15-2008 10:25 PM |
| Seperate commands on the same line | bobk544 | Shell Programming and Scripting | 3 | 07-28-2007 06:14 PM |
| code that reads commands from the standard i/p and executes the commands | Phrozen Smoke | High Level Programming | 4 | 01-22-2007 02:06 AM |
| Commands and Command Line Flags | Kedgeboy | Shell Programming and Scripting | 4 | 07-11-2005 11:23 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Also, if you want to conditionally execute the second command based on the return code of the first you can use || or &&.
<command1> && <command2> will execute command2 if command1 returns a value >= 0 (ie success). <command1> && <command2> will exeucte command2 if command1 returns a value < 0 (ie failure) Cheers, Keith |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|