Re: Pipe variable to CUT -- Resolved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for everyone's input and suggestions. For some reason CUT was not being cooperative, so I delved further into my reference manual to find another way to skin a cat. The solution was ...gawk. See the complete solution below.

Input Script
VALUE1=`arkc -drive -read -D name=BisonTape`
echo 'Value1 : '$VALUE1
VALUE2=`echo $VALUE1|gawk -F= '{ print $2 }'`
echo 'Value2 : '$VALUE2

Display Output
Value1 : tpname=Wednesdays
Value2 : Wednesdays



----- Original Message ----- From: "Mike Wooding" <timmywooding@xxxxxxxxx>
To: "Jeff Boyce" <jboyce@xxxxxxxxxxxxxxx>; "General Red Hat Linux discussion list" <redhat-list@xxxxxxxxxx>
Sent: Thursday, April 14, 2005 1:13 PM
Subject: Re: Pipe variable to CUT




--- Jeff Boyce <jboyce@xxxxxxxxxxxxxxx> wrote:
Greetings -

I am having a problem using CUT to obtain a subset of text within a
variable
... [snip]

VALUE1=`arkc -drive -read -D name=BisonTape`
echo 'Value1 : '$VALUE1
VALUE2=$VALUE1|cut -f2 --delimiter=

VALUE2=`echo $VALUE1 | cut -f2 -d=`

echo 'Value2 : '$VALUE2


He who laughs last thinks slowest.



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux