I am running a script in bash
prompt/command line manually. How to pass arguments?
mem_utilization=`free -m | awk 'NR==2{printf "%.2f\n", $3*100/$2 }'`
Note:
I am new to scripting, that's the reason above code is incomplete. Please use any argument in the code. Let's say username and password are the arguments.
One can answer this question in the manual context.
(Just to give you a brief, this is what I am trying to do. I like to know this and do the same when running the code through SSH in exec mode (or) bash prompt (or) command line (or) python code in python prompt.)
mem_utilization=`free -m | awk 'NR==2{printf "%.2f\n", $3*100/$2 }'`
Note:
Use %
symbol as an argument and attach at the end.
mem_utilization=80%