How to get the 3rd element/column from each line from a file?



How to get the 3rd element/column from each line from a file?..

Answer / Nitesh Goel

To access the third field (column) of each line in a file, use the 'awk' command: awk '{print $3}' filename

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What language is bash?

1 Answers  


What are the advantages of shell script?

1 Answers  


What is the conditional statement in shell scripting?

1 Answers  


Which is best institute for testing tool?

0 Answers  


How to print some text on to the screen?

2 Answers  


What is shell chemistry?

1 Answers  


What is shell environment?

1 Answers  


write a program to display all the files from the current directory which are created in particular month

6 Answers  


What is c in shell script?

1 Answers  


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

1 Answers  


How to print all array elements and their respective indexes?

1 Answers  


c program to check whether all the directories in the path exists has read and write permission

1 Answers  


Categories