assigning the output of a unix command to a shell variable
Suppose you have to obtain the output of ls command in a variable called var,
then you could do following.
var=`ls`
echo $var
Hello World. This is my First of First Blog. Here I will try to write things related to what I learn, Since I am kinda obsessed with Technology’s lineage. I, being a Java professional, love Java profoundly and so tried to make a blog that will help you and me of course to be in touch with new happenings in the field of technology. I may soon start a discussion forum based on Java, for that we need to wait a while, after all , not always, good things are FREE….
Suppose you have to obtain the output of ls command in a variable called var,
then you could do following.
var=`ls`
echo $var
Posted by Unknown at 9:14 AM
0 comments:
Post a Comment