![]() |
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 |
| 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 |
| Using Subroutine / Function in case statement | sriram003 | Shell Programming and Scripting | 1 | 05-07-2009 08:38 AM |
| Running function or command concurrently in a bash script | dj_bridges | Shell Programming and Scripting | 8 | 02-05-2009 07:58 AM |
| Subroutine Hung | bintaleb | High Level Programming | 3 | 12-03-2008 01:03 AM |
| Using the passwdpolicy() subroutine. | syndex | AIX | 0 | 10-02-2008 09:54 PM |
| chpass subroutine not updating NIS | rmm47 | High Level Programming | 1 | 03-30-2007 11:30 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Running more than one function from a subroutine
Hi All
I am new to perl so had one question. I have one Subroutine which works as expected and below is just an example. where I ran a command and check the output. so my question is if I have more than one command then how to check the results, meaning I want to add more command and check the results of each one after another.Thanks for your help example of new command can be my $command2 = fdisl -l; my $command3 = du -f; ======================================== sub testSub{ my $variable1 = test 123; my $variable2 = linux; my $command1 = uanme -a ; if ($?) { push (@$errors ,"uname -a is failed for $hostname" ); } else { $Log->LogInfo("uname -a passed for $hostname"); |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|