Skip to content

Linux Sed Command

Basic Usage

  • replace a string in a file

    sed -i "s/<string to be replaced>/<string will be replaced to>/g" $file

    You also can escape special character with a backslash