10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
On Linux i get the desired ouput:
echo "<value>WEB_USER</value>" | sed 's/\(<value>\|<\/value>\)//g'Output:
Executing the same command on Solaris:
echo "<value>WEB_USER</value>" | sed 's/\(<value>\|<\/value>\)//g'Output:
I need to get the desired output on Solaris i.e. WEB_USER and... (4 Replies)
Discussion started by: mohtashims
4 Replies
2. Shell Programming and Scripting
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
3. Shell Programming and Scripting
The following command works perfectly in Terminal, but not in Applescript. (Returns "unknown token" error for square brackets.)
(new to site. sorry.)
I have an Applescript that is designed to find and remove any square-bracketed text, including the square brackets.
I ran the following code from... (1 Reply)
Discussion started by: Phillip Acosta
1 Replies
4. Shell Programming and Scripting
Hi,
I have a problem with a SED script that works fine on AIX but does not work properly on a Solaris system.
The ksh script executes the SED and puts the output in HTML in tables.
But the layout of the output in HTML is not shown correctly(no tables, no color). Can anyone tell if there is... (7 Replies)
Discussion started by: Faith111
7 Replies
5. Shell Programming and Scripting
Hi, I have a question.
I define a function using sed command:
replace()
{
searchterm=$1
replaceterm=$2
sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp'
mv $WORK'tempfile.tmp' $3
}
Then I call
replace 'test = 0' 'test = 1' $myfile
This code... (1 Reply)
Discussion started by: Dark2Bright
1 Replies
6. Shell Programming and Scripting
Hi, I have a question.
I define a function using sed command:
replace()
{
searchterm=$1
replaceterm=$2
sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp'
mv $WORK'tempfile.tmp' $3
}
Then I call
replace 'test = 0' 'test = 1' $myfileThis code works well in... (1 Reply)
Discussion started by: Dark2Bright
1 Replies
7. Shell Programming and Scripting
Hi,
I use this command in Linux but if I run the same command does not work in freebsd.
Follow the below command:
Linux works:
sed -e '1731a\' -e '####' squid.conf > squid2.conf ; sed -e '1731a\' -e 'acl TESTE_ip src 192.168.1.1/255.255.255.255' squid2.conf > squid.conf ; sed -e... (7 Replies)
Discussion started by: andreirp
7 Replies
8. Shell Programming and Scripting
Hi all .... vexing problem here ...
I am using sed to replace some special characters in a .txt file:
sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt
This command replaces <ED> with í , <F3> with ó and <E1> with á.
When I run the command to standard output, it works... (1 Reply)
Discussion started by: crumplecrap
1 Replies
9. Shell Programming and Scripting
Hi all,
Our application installation uses "sed" command to delete rest of line. It work perfect on Linux but fail on Solaris.
The OS versions are Solaris 9 and Linux Red Hat AS 3.
yourfile.txt
hello and world
cat and dog
hello world
in linux:
cat yourfile.txt | sed ‘s/\(\+\)... (3 Replies)
Discussion started by: javac2005
3 Replies
10. Shell Programming and Scripting
Hi folks,
Our application installation uses "sed" command to append string after specific line or after line number.
Both cases work perfect on Linux but fail on Solaris.
The OS versions are Solaris 9 and Linux Red Hat AS 3.
i.g:
Linux:
-----
file foo.txt
aaa
bbb
ccc
ddd
root#... (4 Replies)
Discussion started by: nir_s
4 Replies