Links

Bash

Useful bash commands
1
# for loop
2
root@box ~ $ for num in {1..4}; do echo "The number is: $num"; done
3
The number is: 1
4
The number is: 2
5
The number is: 3
6
The number is: 4
# for loop combining awk
root@box ~ $ for subd in $(awk '{print $1 ""}' subdomains.txt); do echo $subd; done
blog.techwithtyler.dev
braindump.techwithtyler.dev
techwithtyler.dev
www.techwithtyler.dev
​
# original file
root@box ~ $ cat subdomains.txt
blog.techwithtyler.dev 234234234
braindump.techwithtyler.dev 25346536
techwithtyler.dev 43564356743
www.techwithtyler.dev 45776568