I'm brand new at shell scripts and I am attempting to complete a homework assignment but I am not quite sure what I am doing wrong here.
The instructions are
Write a bash script that takes two arguments and generates a nicely formatted, plain-text, manual page for the command denoted by the first argument, stored in the file named after the second argument, with the extension “txt”.
This is for the manual page passwd
Here's my first attempt at a script. Can someone please help me accomplish this and point me to resources that will help me with the syntax of writing scripts?
#!/bin/bash script man passwd | col -b exit mv typescript MAN_PASSWD_FORMATTED.txt done
I'm trying to utilize cmds I have learned to accomplish this, however, when I run the script, it will only run the first cmd "script" And I dont even think my script is how he wants it to be, I think im taking the long route here.