On Tue, 4 Jun 2002, Shridhar Daithankar wrote: > [shridhar@daithan shridhar]$ export ORACLE_HOME=d:\\oracle\\oracle9 > [shridhar@daithan shridhar]$ echo $ORACLE_HOME > d:\oracle\oracle9 > [shridhar@daithan shridhar]$ echo $ORACLE_HOME| sed s/'\\'/'\\\\'/g > d:\\oracle\\oracle9 > [shridhar@daithan shridhar]$ t=`echo $ORACLE_HOME| sed s/'\\'/'\\\\'/g` > sed: -e expression #1, char 8: Unterminated `s' command > [shridhar@daithan shridhar]$ > > I was under impression that if a shell command prints something on console, > it can b put in `` and assigned to a shell variable. But in this case I had
right, except that `` performs double quotish substitution, so anything in the `` is first replaced, and then executed (that's why $ORACLE_HOME works). do this: t=`echo $ORACLE_HOME | sed -e 's/\\\\/\\\\\\\\/g'` and start sufferring from backslashitis. :D -- Heard that the next Space Shuttle is supposed to carry several Guernsey cows? It's gonna be the herd shot 'round the world. _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
