I'm currently working on a BASH script (unable to post as it's graded, however we are allowed to ask for GUIDANCE) and I've nearly completed it.
It uses the ls command a lot, and we need to make it so the user can choose whether or not they want the ls command to include human readable format of sizes or not. (i.e whether ls includes -h).
I was wondering, is there a way to make it so that if the second argument of the script execution is -h, that all ls commands will include the -h option?
Cheers!
man getoptis your answer