In the script below, I can't seem to make $var1 expand in the second statement. I've tried $var1, ${var1}, echo $var1 and '$var1'. It is inside a few sets of quotes and parenthesis which I guess is ...

I have a string message which contains data in double quotes. I need to put \ in front of every double quote how can u do it in shell ?
I used Perl and it works fine, but I'm looking for sh command:
...

I've found bits and pieces of each of the things I want to do across the Web, but nothing exactly fits my use case.
I'm trying to write a script that copies multiple specific files to a directory on ...

I'm guessing someone will tell me I'm doing something wrong and dumb and noobish, but I'm trying to script something in the most straightforward method possible and use sudo commands to do something ...

Im trying to customize the way the PS1 prompt shows in terminal and CLI on Arch Linux, but it's not printing the proper thing it should be doing.
First up is I'm trying to colorize parts of the PS1 ...

In grep you can use --group-separator to write something in between group matches.
This comes handy to make it clear what blocks do we have, especially when using -C X option to get context lines.
$ ...

Similar to How to check how long a process has been running?, I am trying to get the elapsed time for a process in seconds in an embedded Linux system using BusyBox and sh (not bash). The difference ...

I am trying to delete all the files with a space in their names. I am using following command. But it is giving me an error
Command : ls | egrep '. ' | xargs rm
Here if I am using only ls | egrep '. ...

ssh has an annoying feature in that when you run:
ssh user@host cmd and "here's" "one arg"
Instead of running that cmd with its arguments on host, it concatenates that cmd and arguments with spaces ...