Skip to content

Tag: bash

Using awk in a bash-script

I’ve been struggling to run an awk result as the arguments of a new awk command within a bash-script; something like this To help eradicate (what I think is) inconsequential code to this problem, gives me and if prepend awk to this result, I get the answer I need. But I’m not able to make it work …

How to auto insert a string in filename by bash?

I have the output file day by day: The date and time string, ex: 202105200900 will change every day. I need to manually rename these files to ( insert a short string x86 after date/time ) any bash script can help to do this? Answer If you’re always inserting the string “x86” at character #18…

Setup or env variable lost after running bash files

Please excuse me if there is an error in the sample code. There are two files testA.sh and testB.sh. testA.sh testB.sh deepak[18:33] $ ./testA.sh test b hello deepak[18:33] $ echo $a deepak[18:33] $ If we run any setup in the testB.sh then how can we use that setup or env variable in the main console (for exa…