tr -d is not working on SunOS 5.9


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 05-18-2009
tr -d is not working on SunOS 5.9

i am using sunos 5.9.

entityname="india\/delhi"
correctpattern="<branch value=\"/`echo $entityname | tr -d '\'`/WORKAREA/\">
echo $correctpattern

the output should be
<branch value="/india/delhi/WORKAREA/">

This is working fine in command line but not working when i placed these codes inside the script.
In the script i have used #!/bin/bash

Please suggest
# 2  
Old 05-18-2009
Your deletion pattern is incorrect.
This sould work better:
Code:
correctpattern="<branch value=\"/$(echo $entityname | tr -d '\\')/WORKAREA/\">

Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Disk Space Utilization in HTML format working in one environment and not working on the other Harihsun Shell Programming and Scripting 13 08-14-2018 07:45 PM
Sendmail not working in SUNOS scriptor Solaris 3 12-19-2017 06:51 AM
Manipulate files with find and fuser not working as expected on SunOs dampio UNIX for Advanced & Expert Users 2 11-07-2017 08:40 AM
Automating pbrun /bin/su not working, whenever manually it is working using putty jorgejac Shell Programming and Scripting 14 12-03-2015 01:32 PM
mailx not working on SunOS 5.9 Jcpratap Shell Programming and Scripting 11 08-23-2012 11:28 AM
SunOs 5.9: why is 'ulimit -c' not working? cnewtonne Solaris 2 01-16-2012 03:57 PM
All i/o (ftp) not working on this SunOS 5.10 steve701 Solaris 7 09-05-2011 04:52 PM
SunOS 5.6 mojoman Solaris 2 11-04-2009 11:36 PM
SunOS 5.8 vs 5.10 hcibl_javok Solaris 1 06-21-2009 07:21 PM
New to SunOS... bbbngowc Solaris 3 03-11-2009 08:35 PM
SunOS 5.10 - VI Arrow keys not working ravashingravi UNIX for Dummies Questions & Answers 7 12-01-2008 10:22 AM
Looking for help with SunOS 5.6 kevpatts Solaris 1 04-21-2008 11:11 PM
SunOS 5.4 mr_balodoy Solaris 6 03-30-2008 11:06 PM
Migration of binary file from Sunos 5.8 to Sunos 5.9 Arvind Maurya UNIX for Advanced & Expert Users 1 07-12-2005 06:23 AM
SunOS 5.8 jxh461 Shell Programming and Scripting 5 03-13-2003 06:37 PM