what i got: array="Programm is Running" array="programm is down" what i want: array="Programm is \e[0;32mRunning\e[0m" array="programm is \e[0;31mDown\e[0m" this will make things a ...
I am trying to use sed to replace '0' with the word 'correct' (I am using echo $? to validate my script and I want to replace the output of echo). The problem is that I have more text in the output ...
What is the most efficient way to replace file's content between specific line numbers with another file? Here is a sample: main.txt: a b c d e f g h i j k l new.part.txt x y z p q r s t u The ...
For example I enter cat /very/long/path/textfile and right after that I decide to give the next command rm /very/long/path/textfile So, my question is: What is the easiest/fastest way to replace ...
I am trying to use the stream editor sed in bash to replace a string in a file to a new string that I entered, I have this thus far: echo "name to change" read updatenaamold echo "enter new name:" ...
I have a space-delimited file that's about 3200 lines long. Each line contains 7+ fields. What I would like to do is edit the file with sed so that every line containing a certain variable in field 5 ...
I'd like to somehow spit out a file (which has env variable references) and substitute the actual values. This is what I've tried, but as you can see it's not working. Any ideas? -bash-3.00$ cat ...