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 create files in unix?

542


Which mode executes the fault handler?

610


How to create a blank file in unix?

515


What are the bits that support the demand paging?

571


Describe file systems in unix?

571






Is mac unix based?

518


Where is unix operating system used?

526


How is unix different from windows?

510


How the Kernel handles the fork() system call in traditional Unix and in the System V Unix, while swapping?

531


How to give execute permission for a file in unix?

507


How do you sort in unix?

570


How to move a background job to forward?

537


What is the ‘nohup’ in unix?

532


Is windows unix based?

510


How do you change directories in unix?

522