I have one text file like
1 filename
2 filename2
3 hi
4 myname
i have one variable in which i have index value..i.e.1,2,3 and so...
i want to copy value after the index into somevariable.....
how i can do it....
I have one text file like
1 filename
2 filename2
3 hi
4 myname
i have one variable in which i have index value..i.e.1,2,3 and so...
i want to copy value after the index into somevariable.....
how i can do it....
var=3
awk -v ln=$var '$1==ln {print $2}' infile | read somevariable
what is this inline?
is it syntax or i am suppose to write the filename
i want to read the value after index into any variable how i can do it?