Hi guys, I'm looking for some thoughts on this. I'm trying to do a clean 1 liner to substitute some values. What I have:
Obviously that's a bit sucky, I'm repeating 3 lines which are all basically doing the same thing. I want to smarten it up. The thing they all have in common is that I'm looking for 'Person' and whatever is after that, and substituting it. Is there a cleaner way to do the above in one go?
Perl - I'm doing a substitution like this:
again, I'm repeating lines - what's a cleaner way to do this in perl? I have like 15 lines of substitions, I'd like it short and sweet - what's the best way to do it? Put all substitions onto one line? how would I do that? or would some kind of array be the best way to do it?
Help/thoughts appreciated
Last edited by rich@ardz; 09-23-2010 at 05:01 PM..
Reason: code tags
I have one question in shell script for escape "\" with command substitution "` `". I post there to seek help to understand how it works.
My original one piece of code in script like this: This piece of code in whole script is working without errors
chk_mode=`sqlplus -s /nolog<<EOF
connect /... (4 Replies)
Hello,
I Have a file like this, with five columns:
B D F T L
---------
0 0 0 0 0
0 0 0 1 0
0 2 0 0 1
I need, for each row, to append another five columns similar to the first ones, but with the field labeled as "T" (4th field of the column) substituted in this way:
(16 * value of... (3 Replies)
mv myFile.txt myFile.txt.bak
sed s/foo/bar/g myFile.txt.bak > myFile.txt
Turn the two-line version, above, of the substitution commands into a shell script, subst1 taking three parameters:
the string to be replaced
the string with which to replace it
the name of the file in which to make the... (1 Reply)
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Hi,
I have to read a file and translate the contents including substituting the variables if any and write to another file without using sed or awk.
For ex:-
inputfile.txt
-----------
servername=$SERVER
application=$APPL
outputfile.txt
------------
servername=actual server name... (2 Replies)