I know that I can do
tr a b < file, but how do I do that for
ls? So for example, How to feed
ls -la list of files from a 'file'. I tried the below and it did't work.
$ cat>test A B C $ ls -l < test
I'm not clear on what "<<" or here document is used for.
One of my class exercises is to use vi to create a file with “:” on line 1 and “6/3” on line 2. Using line 1 as the delimiter and line 2 as the field, cut and display column2 from a file.
Am I supposed to loop and read the 2 lines into a variable? Do I use
sed -n '#p' (file)? Is there an elegant 1 line solution?