Write a shell script which will
- Read usernames.txt text file with usernames and generate passwords for each username using a hash value generated using
shasum command.
- Stores the first ten characters from the output as a password and saves it into a new file
user_passwords.txt.
Hint:
$ shasum --help
Usage: shasum [OPTION]... [FILE]...
Print or check SHA checksums.
With no FILE, or when FILE is -, read standard input.
-a, --algorithm 1 (default), 224, 256, 384, 512, 512224, 512256
...
Sample Input
tisha
sumedh
avyan
navya
Desired Output
tisha:c0840f4321
sumedh:117045d067
avyan:6951b4a77f
navya:57a84ed47c