How would you print just the 25th line in a file using
smallest shell script?

Answer Posted / alok

awk -F"|" ' NR == 25 {print} ' emp.lst

in this file | is a field seprator

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default ubuntu terminal?

629


What is the first line in every perl script called?

563


How will you pass and access arguments to a script in linux?

602


How do I run a shell script on a mac?

641


Explain about gui scripting?

630






Is powershell a language?

574


How do I run a powershell script?

588


How can you find out how long the system has been running?

530


What is the conditional statement in shell scripting?

664


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

577


How would you compare the strings in a shell script?

553


How to print the first array element?

569


Why should we use shell scripts?

606


Explain about the slow execution speed of shells?

784


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2236