Skip to content

Instantly share code, notes, and snippets.

@zeldal1
Forked from loneicewolf/snippets.sh
Created May 3, 2024 16:40
Show Gist options
  • Save zeldal1/9becd0ea4234f7c7f2140833f4af04df to your computer and use it in GitHub Desktop.
Save zeldal1/9becd0ea4234f7c7f2140833f4af04df 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