i have one column with data smith
john
michale
the o/p should be smith,john,michale how we do in unix

Answer Posted / b k roy

Suppose they are asking for displaying just one of the
columns in a directory, make a note of that column number
as it appears when we do a ls -lrt. Then we can use awk to
just display the one columns as o/p.

If column number is n, then do this:

ls -lrt | awk '{print $n}'

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to log out in unix?

723


Does windows 10 have unix?

676


How is windows different from unix?

727


What is a unix shell?

745


What are the main features of unix operating system?

722


Enlist common shells with their indicators.

770


What are the essential features of the unix operating system?

706


Who developed unix operating system?

702


briefly describe the shell's responsibilities?

1000


What are different types of files in unix?

750


What are the various ids in unix processes?

696


Does mac use unix?

698


How would you display the last line of a file?

683


List some features of unix.

718


What is af_unix?

640