10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I understand that I should be able to ouput a literal \ by escaping it with a preceding \. My problem is that I am trying to ouput a script that will subsequently be run on a different system with UNC pathing, so I want to ouput two \\ in a row, but escaping them both in sequential order is not... (4 Replies)
Discussion started by: JourneyRider
4 Replies
2. Shell Programming and Scripting
Hi
I use :
path=/var/www/admin
echo "$path" | sed -e 's/\//\\\//g'
this return
\/var\/www\/admin
and is ok.
but
path2=`echo "$path" | sed -e 's/\//\\\//g'`
echo $path2
return an error:
sed: -e expression #1, char 9: unknown option to `s'
Can anyone help me?
Thanks (3 Replies)
Discussion started by: georgian
3 Replies
3. Shell Programming and Scripting
I'm cleaning this from some html files
style=''
but when I try
's/style=\'\''//'
I get an unmatched ' error (4 Replies)
Discussion started by: dba_frog
4 Replies
4. Shell Programming and Scripting
Hello
This should be easy, but bash is giving me headaches.
At the command line the following command works:
duplicity --include /home --exclude '**' / file:///foo
Doing that from a script is not straightforward. Note that it is basically a requirement that I place the... (3 Replies)
Discussion started by: brsett
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have pipe delimited file in which some of the description fields can have commas. e.g.
1|123|abc,def
2|456|qwert
3|345|aty,try,rty
I need to convert this to a 'csv' file BUT i need to add \ before every comma present in the description values (so that my next program can read it as... (3 Replies)
Discussion started by: dsrookie
3 Replies
6. Shell Programming and Scripting
I want to append the following line to /var/spool/cron/root:
*/7 * * * * /root/'Linux CPU (EDF).sh' > /dev/null 2>&1
How to accomplish this using echo?
---------- Post updated at 04:09 PM ---------- Previous update was at 04:07 PM ----------
"Linux CPU (EDF)" is actually stored in a... (11 Replies)
Discussion started by: proactiveaditya
11 Replies
7. UNIX for Advanced & Expert Users
Hi
just for regular use i m working on small module written in perl for getting date in specified format like i have to specify date format and then seperator to seperate date i am 95% done. now i m sure explanation i gave is not good enough so i am putting output here :
C:\Documents and... (2 Replies)
Discussion started by: zedex
2 Replies
8. UNIX for Dummies Questions & Answers
I have a variable containt something like this, c:\mask\mask. How can I escape "\" in the values? I want the value as it it. (9 Replies)
Discussion started by: swmk
9 Replies
9. Shell Programming and Scripting
hi,
echo 'abc' will give output abc
how can i get output as 'abc'
plz help. thanks in advance (3 Replies)
Discussion started by: javeed7
3 Replies
10. Shell Programming and Scripting
I have the following situation
============
export DirectoryName=/tmp/xyz
if ; then
some_new_env=$DirectoryName"/*"
=======================
I tried all the ways of escaping the '*', but still the shell seems to expand the '*' character. I want some_new_env to contain "/tmp/xyz/*"
... (7 Replies)
Discussion started by: rkshukla14
7 Replies