Re: Newbie question - running a command and looking at output

2009-07-18 Thread Dave
Dave wrote: I'm trying to run a command (arch -k) and check if the value returned is 'sun4v' or not. kir...@t2:[~] $ arch -k sun4v In fact, I want to do 3 three things 1) Check if the system is Solaris. 2) If it is Solaris, check if 'arch -k' prints 'sun4v' 3) If both 1 and 2 are true, copy

Newbie question - running a command and looking at output

2009-07-18 Thread Dave
I'm trying to run a command (arch -k) and check if the value returned is 'sun4v' or not. kir...@t2:[~] $ arch -k sun4v In fact, I want to do 3 three things 1) Check if the system is Solaris. 2) If it is Solaris, check if 'arch -k' prints 'sun4v' 3) If both 1 and 2 are true, copy a file. Sin