Configuration: Windows XP Internet Explorer 6.0
|
Hello
I'll leave passing the string to the script t you, but I'll do the hard part. The while loop parses the two variables: #!/bin/ksh mystring="01.Driver Report|userid@company.com" echo "$mystring"|while IFS="|" read f1 f2 do name="$f1" email="$f2" done echo "$name" echo "$email" |
Hi the above code is not working...
specifically, the string for me is: netlist.date and i want netlist and date seperate ("." is the seperator) plzz help with the code |
Try this ...
name=`echo "01.Driver Report|userid@company.com" | awk -F"|" '{print $1}'` echo $name email=`echo "01.Driver Report|userid@company.com" | awk -F"|" '{print $2}'` echo $email |