I have csv data like:
a,b,c,d,e,f,g,h
I want this data in a list, one letter in each line. Is it possible is shell script? I have tried to extract each letter using cut command as shown below:
less list.txt | cut -d"," -f?
The command is working but the problem here is the number of fields is unknown. I have to place this command in a loop and iterate on the list so that I can extract the values one-by-one a redirect them to another file.
less. More conventional would becut file,cut < file, or, if you really want to use a pipe,cat file | cut. If less did its usual job, you'd have to keep hitting the spacebar to finish, but actually, it notices that standard output is not your screen, and basically turns itself intocatfor you.