Tagged Questions
4
votes
5answers
122 views
How to use ' in alias?
I have one-line that I want to call using alias.
while printf '%s ' "$(df -P / | awk 'NR==2 { print $(NF-1) }')"; do sleep 30; done
I tried to escape ' like \' but it didn't work.
What is the ...
0
votes
1answer
40 views
Colon breaks the variable subsitution [closed]
I am trying to lookup some C functions so that I could debug while using strace. So I setup a bash function to look it up in firefox (or links), but the substitution falls apart with : and escaping ...
1
vote
2answers
188 views
Convert discus output into readable HTML mail
How can I take the DISCUS command output below:
and convert it into something HTML email friendly? I've bash scripted something like this:
#!/bin/sh
discus > /tmp/discus.log
touch ...
1
vote
2answers
249 views
bash scripting - Any function to escape character?
I am trying to automate some of my stuff and facing a issue, the problem boils down to escaping the value that is being passed as a argument to the script.
myScript.sh
#!/bin/bash
loadPatch -name ...
2
votes
1answer
141 views
How to capture text formatting in bash?
The following shell script works but removes colored formatting generated by rspec:
#!/bin/bash
OUTPUT=`rspec`
echo "$OUTPUT"
How to preserve the colors?
3
votes
1answer
131 views
Printing colored text using script
When I type below command in the shell I get the OUTPUT in green color.
Command
echo "\033[32mCONNECTING TO abpwrk\033[m";
Output(in green color)
CONNECTING TO abpwrk
But if I use the same ...
3
votes
2answers
723 views
Passing a bash command-line argument containing a dot
How can a command-line argument containing a dot (.) be passed? Are there any escape sequences for capturing characters like dot?
The following invocation of a bash-script from the shell does not ...