10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Please find the code below where I want to add the variable value in between the XML tags. I am taking one string and my goal is to put them between the xml tags. Ex : in between <name> , <lname>
Kindly suggest a correction because while executing this script I am getting and... (8 Replies)
Discussion started by: rajneesh4U
8 Replies
2. Shell Programming and Scripting
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies
3. Shell Programming and Scripting
I am having trouble with a part of my substitute script I am using. I have it look through a file and find an exact match and then if it finds that match in the 1 file it should run the following 1 liner on 3 different files.
perl -pi -e 's/$CurrentName\s/$NewName/g' foo.cfg;
The issue that is... (8 Replies)
Discussion started by: Takau
8 Replies
4. Shell Programming and Scripting
Hi,
I have string like this:
$str=' DNA OR ("rna AND binding AND protein")';
I just wanted to substitute AND with a blank. How can i do that?
I want the output like this:
$string= DNA OR ("rna binding protein") (3 Replies)
Discussion started by: vanitham
3 Replies
5. Shell Programming and Scripting
Hi,
My original shell is csh, I don't likw it, so I have to run bash every time after I login, the problem is I have a script like
export PLOG=$1,
every time I run the script under bash, the PLOG won't be set, I know I can use source to set the PLOG, is there any other way to do it?
... (3 Replies)
Discussion started by: laopi
3 Replies
6. UNIX for Dummies Questions & Answers
I'm using sed to perform a simply search and replace. The typical data is:
<fig><image href="Graphics/BAV.gif" align="left" placement="break"
I need to replace the value in the first set of quotes, keeping the remainder of the line the same. Thus:
<fig><image href="NEW_VALUE" align="left"... (3 Replies)
Discussion started by: Steve_altius
3 Replies
7. Web Development
How can I print exactly what I want in between my quotes? I have xml that I want to echo exactly and it is not printing out the brackets and gets hung up at the "<?" and all that. Is there a way I can just say echo exactly between these quotes? (2 Replies)
Discussion started by: mainegate
2 Replies
8. Shell Programming and Scripting
is there any way to include one shell script into other
like include in c
apart from putting it in a function (3 Replies)
Discussion started by: mobydick
3 Replies
9. Shell Programming and Scripting
hi
How can one change an environment varaible inside a shell script
say my bash shell has a env variable export FOO="Day"
no i want to write a script inside which the FOO variable is modified to say
export FOO=NIGHT
after this script finishes te bash shell should show me NIGHT when i... (1 Reply)
Discussion started by: wojtyla
1 Replies
10. Shell Programming and Scripting
Hi,
I have a program that searches for a particular string patten. I am however having difficulty passing the varible $i (in a loop) as the string pattern to replace. Using either perl or sed search and replace statements, I get the same kinda result. For example, using the perl:
for i in... (3 Replies)
Discussion started by: Breen
3 Replies