Skip to content

Instantly share code, notes, and snippets.

@loneicewolf
Created November 1, 2022 10:38
Show Gist options
  • Save loneicewolf/c44c834948fa71f2544d47e77ef6309c to your computer and use it in GitHub Desktop.
Save loneicewolf/c44c834948fa71f2544d47e77ef6309c to your computer and use it in GitHub Desktop.
bash snippets - keywords/tags -- bash commands, sh,shell,snippets,one-liners
# From Adam Liss's comment
# https://stackoverflow.com/a/9387914/14346786
# Read a file using a bash script
i=0;while read l;do ((i=i+1));echo "$i:$l";done < file.txt
# alphabet
az=$(echo {a..z} | tr -d ' \n\t\v')
# coming more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment