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.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89

1 Answers1

1

You can use sed to do this:

sed -ne '1p;$p' script.sh
Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89