tr -d is not working on SunOS 5.9


 
Thread Tools Search this Thread
Operating Systems Solaris tr -d is not working on SunOS 5.9
# 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 Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

--SunOS 5.10 nawk for paragraph not working

The machine is using bash: ================== bash -version GNU bash, version 3.2.51(1)-release (i386-pc-solaris2.10) Copyright (C) 2007 Free Software Foundation, Inc. ========================= I have the following xml file. am trying to get a whole paragraph if it meets certain criteria.... (9 Replies)
Discussion started by: gilgamesh
9 Replies

2. Solaris

Sendmail not working in SUNOS

Hi All i am trying to send a mail from SunOS to my outlook mail but it is not working neither giving any error please suggest # uuencode /tmp/t.txt t.txt | mailx -s test v.com # # uname -a SunOS 5.9 Generic_122300-25 sun4u sparc SUNW,Sun-Fire-V440 (3 Replies)
Discussion started by: scriptor
3 Replies

3. UNIX for Advanced & Expert Users

Manipulate files with find and fuser not working as expected on SunOs

Greetings, For housekeeping, I use the following command: find /some/path -type f -name "*log*" ! -exec fuser -s "{}" 2>/dev/null \; -exec ls -lh {} \; It finds all log files not currently in use by a process and manipulates them. This command always works on linux and redhat machines,... (2 Replies)
Discussion started by: dampio
2 Replies

4. Shell Programming and Scripting

mailx not working on SunOS 5.9

I m trying to send o/p of one file using mailx command but is not working PFB command : cat healthchecklog | mailx -s "HEALTH CHECKS" abc@jkl.com also I have checked the ps -ef for mailx which is giveing below o/p ps -ef | grep mail root 364 1 0 Jun 08 ? ... (11 Replies)
Discussion started by: Jcpratap
11 Replies

5. Solaris

SunOs 5.9: why is 'ulimit -c' not working?

I have a situation where the system is dumping a 2g causing filesystem to fill up. We identified the source and working on a solution. However, I wanted to limit the size of the 'core' file. Please examine the test scenario ... cnewtonne@mars> ulimit -f 0 cnewtonne@mars> ls -ltr core*... (2 Replies)
Discussion started by: cnewtonne
2 Replies

6. Solaris

All i/o (ftp) not working on this SunOS 5.10

Hi everyone: I have been trying to simply FTP a file over to this SunOS 5.10 (which is same as Solaris 10 now) and nothing works! I can only Telnet to this via SSH (with my own account/uid), and I can also send simple mail out with mailx, that's all!!! I cannot FTP to it (I think FTP... (7 Replies)
Discussion started by: steve701
7 Replies

7. UNIX for Dummies Questions & Answers

SunOS 5.10 - VI Arrow keys not working

Hi I am working on SunOS 5.10 from remote terminal using putty. Also echo $TERM xterm In vi editor when in insert mode arrow keys are not working for cursor movement instead they print A B C and D. Please help. thanks ravs (7 Replies)
Discussion started by: ravashingravi
7 Replies

8. Solaris

SunOS 5.4

Hi, I Hope you can help me with my problem. I need to have an installation CD of this version. Is there any site you can recommend that I can download an image of this OS? Thanks and God Bless!!! (6 Replies)
Discussion started by: mr_balodoy
6 Replies

9. UNIX for Advanced & Expert Users

Migration of binary file from Sunos 5.8 to Sunos 5.9

I have compiled binary file using "cc" on SunOS 5.8 and the same binary file i have copied to SunOS 5.9 and it is giving me core dump error.I want to know whether migration of compiled code from lower version to higer version created this problem. how can i solve this problem.I am pasting the core... (1 Reply)
Discussion started by: Arvind Maurya
1 Replies

10. Shell Programming and Scripting

SunOS 5.8

I am loging into a SunOS 5.8 box for the first time. I do not see a .profile file in the home directory. Also on the command line when I type a backspace to correct my typing I get a ^H character. Where and how can I fix this? Thanks in advance (5 Replies)
Discussion started by: jxh461
5 Replies
Login or Register to Ask a Question