Answers for "Write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers"

0

Write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers

echo "enter the filename"

read fname

echo "enter the starting line number"

read s

echo "enter the ending line number"

read n

sed -n $s,$n\p $fname | cat > newline

cat newline
Posted by: Guest on February-27-2021

Code answers related to "Write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language