UUoC! awk 'length == 8' dict1 > dict2
For the second one, a 'for' loop won't work if the wordlist has more lines than ARG_MAX or if the words contain spaces, plus UUoC again, so that would be a very poor solution. A 'while' loop would be better: while read word; do echo "${word}123"; done < dict2 >> dict3
Or, since this is Hashcat: ./hashcat --stdout -j '$1$2$3' dict2 >dict3
Personally I'd probably just use sed 's/$/123/' dict2 >dict3
For the second one, a 'for' loop won't work if the wordlist has more lines than ARG_MAX or if the words contain spaces, plus UUoC again, so that would be a very poor solution. A 'while' loop would be better: while read word; do echo "${word}123"; done < dict2 >> dict3
Or, since this is Hashcat: ./hashcat --stdout -j '$1$2$3' dict2 >dict3
Personally I'd probably just use sed 's/$/123/' dict2 >dict3