I currently have 2 bash command line strings I use to gather data needed for a certain task. I was trying to simplify and have only one command used to gather the data without using a script.
cat a file and pipe into a
grep command and only display the integer value. I then copy and paste that value into an equation which will always be constant except for the
grepped value from the first command.
- 1st command:
cat /proc/zem0 |grep -i isrs|grep -Eo '[0-9]+$'
- 2nd command:
echo $(( (2147483633-"**grep value**")/5184000 ))
I'm stumped as to how I can accomplish this. Any guidance on this would be greatly appreciated!