0

I have a script containing 5 lines in it. what is the command to view only 1st and last line in the script in one single expression.

1 Answer 1

1

You can use sed to do this:

sed -ne '1p;$p' script.sh

Not the answer you're looking for? Browse other questions tagged .