Skip to content

Instantly share code, notes, and snippets.

@rohan-varma
Created June 8, 2021 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohan-varma/799e65da2aa0b2d6bd0d1ba75dbe37b6 to your computer and use it in GitHub Desktop.
Save rohan-varma/799e65da2aa0b2d6bd0d1ba75dbe37b6 to your computer and use it in GitHub Desktop.
sed -i '1 i\#!/bin/bash' *.sh --> sed -i keep the change in file, don't write to stdout. 1: when sed is on the first line, i - insert following line, *.sh - files which to sed!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment