10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm new to this and very much interested to learn unix.
Can any one explain me the symbols y we use this is scripting(~ and $).
It would be great if some one explain with the eg.
Naveen A (2 Replies)
Discussion started by: Pranaveen
2. UNIX for Dummies Questions & Answers
Can some one explain what does the given two sed commands do :confused:
sed "s/\'/\\\'/g" |
Please find the sample code i used to find out what this is doing , but it has confused me more :wall:
$ cat sri1.txt
$ sed 's/\"/\\\"/g' sri1.txt
'... (5 Replies)
Discussion started by: Sri3001
3. Shell Programming and Scripting
i need find and replace a sting with a new variable having value as spaces in between.
set a = "i am variable"
set b = "i am second"
sed -e 's/find_string/'$a'/g' -e 's/find2_str/'$b'/g' input_file
here it is giving error...
How to get an varaible, which is... (6 Replies)
Discussion started by: vasanth.vadalur
4. Shell Programming and Scripting
I am new script learner,
so my basic doubt is ,
how to store value of any command in a variable example
$ ls | wc -l
i want to stote the output of this in a variable c.
so that i can use c in if else loop.
and when do we use " ` " symbol in script..
can anyone also tell for... (5 Replies)
Discussion started by: hi2_t
5. Shell Programming and Scripting
I want to add a / at the end of a number. for example i have CQ65758 /, in this case i want to shift that backspace one space to the left so the my result becomes CQ65758/.
How can i do that with sed.
Adi (3 Replies)
Discussion started by: asirohi
6. UNIX for Dummies Questions & Answers
Today I was just fooling around with directories and faced this. I create a directory 'testdir' and create a file 'myfile' inside it.
gandalf@gondor:~$ mkdir testdir
gandalf@gondor:~$ cd testdir
gandalf@gondor:~/testdir$ touch myfile
Then I set the following permissions for the... (7 Replies)
Discussion started by: ranj@chn
7. Shell Programming and Scripting
I have a script called sam.sh which consists of a single echo statement like this
I changed the mode for the script by giving chmod a+x sam.sh.
If I want to execute the scrpt by just giving the name at the command line "sam.sh", what should I necessarily do?... (3 Replies)
Discussion started by: sendhilmani123
8. Shell Programming and Scripting
On the below "IF" i test if the user have put the first argument.
I also would like to test if the user have written a second argument.
So, my doubt is:
- How can i evaluate 2 conditions on a if statement? How is the OR created?
- How can i to verify if the second argument is non... (1 Reply)
Discussion started by: tmxps
9. UNIX for Dummies Questions & Answers
i have a variable exported as
then tried with,
echo "tt" | sed 's/^/$VAR/'
expected result as
but obtained only,
i could nt get where i am wrong.
Thanks. (3 Replies)
Discussion started by: matrixmadhan
10. Shell Programming and Scripting
i want to use variable in sed..
sed 's/ROOTMAILID/$variable/g' conf.test
but its not working..
thanks in advance
esham (2 Replies)
Discussion started by: esham