Saturday, 18 April 2009

Extracting command output using eval

suppose i want to extract some fields out of date command output and store them in a temporary variables for use in another instance.I can do this using eval as follows :

eval $(date | awk '{print "month="$2";day="$3}')

No comments:

Post a Comment

Tweets by @sriramperumalla