Lets say when I do ls command the output is:
file1 file2 file3 file4
Is it possible to display only a certain column of output, in this case file2? I have tried the following with no success:
echo ls | $2
Basically all I want to do is echo only the second column, in this case, I want to echo:
file2
ls
output?ls
and after creating some files/folders it may no longer be what you want. As terdon pointed out there sure are better ways to get what you want