Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / guest

head -25 filename | tail -1

Is This Answer Correct ?    14 Yes 2 No

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

Answer / swaroopa

sed -n 25p <filename>

Is This Answer Correct ?    11 Yes 0 No

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

Answer / alok

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

in this file | is a field seprator

Is This Answer Correct ?    0 Yes 4 No

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

Answer / santana20142003

$ls -lrt | awk 'NR==2'

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More Shell Script Interview Questions

1.Write a script, which converts a number from binary to hexadecimal format or vice versa.

1 Answers   ADP,


What are the additional egrep symbols?

2 Answers  


What is the command for " how many shell is running in your system or how many shell supported by your system " ?.

3 Answers  


Explore about environment variables?

0 Answers  


If you have a string "one two three", which shell command would you use to extract the strings?

5 Answers  


How do I edit a .sh file?

0 Answers  


What is the use of a shebang line?

0 Answers  


How do I open the shell in cmd?

0 Answers  


What is ms powershell?

0 Answers  


Create a bash shell script that reads a line from the user consisting of 5 words and then prints them out in reverse order. Name this script "reverse.sh"

1 Answers  


How Connect to a Database in Shell Programming?

4 Answers   Syntel,


Print the 10th line without using tail and head command.

0 Answers  


Categories