In a file , how to retrieve the lines which are the
multiples of 50 ? like 50,100,150th lines etc.
Answer Posted / vivek
egrep "^[0-9]*[05]0$" filename
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What are the types of script?
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.
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
Why should we use shell scripts?
What is an inode block?
Calculate a real number calculation directly from the terminal and not any shell script.
Determine the output of the following command: name=shubham && echo ‘my name is $name’.
Which scripting language is best for automation?
Is cmd a shell?
What is batch file programming?
What does $@ mean bash?
What is path variable bash?
What is shell variable?
What is subshell?