Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GiovanniBalestrieri/26658aefc875c2579e9b to your computer and use it in GitHub Desktop.
Save GiovanniBalestrieri/26658aefc875c2579e9b to your computer and use it in GitHub Desktop.
Bash Script to append string to the last modified file
#!/bin/bash
ls -t | head -1 | xargs sed 's/$/,yes/' -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment