How would you print just the 25th line in a file using
smallest shell script?
Answers were Sorted based on User's Feedback
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 do I read a .sh file?
What does it mean to debug a script?
HOW TO CREATE 10 USERS IN UNIX(HP-UX) USING SHELL SHELL SCRIPT?
What is the command to find out today's date?
What does debug script mean?
What makes c shell a more preferable option than the bourne shell?
How to customise the existing shell?
Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"
Explain about shebang?
How will you find the 99th line of a file using only tail and head command?
There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.
What is difference between bash and shell?