10 More Discussions You Might Find Interesting
1. Programming
We have a formatted screen system where a driver program passes the locations of a list of files that called programs may be using. It will look something like this:
/{number of characters varies}/DATA/MASTERFILEBecause of the size of some files we will be splitting older records into a history... (2 Replies)
Discussion started by: wbport
2 Replies
2. Shell Programming and Scripting
Hi,
I'm new to Perl, and I want to change a few columns in a file in order to insert them into a database.
The input file looks like this:
00001,"01/1234567" ,"Tst2"
00002,"01/4545646" ,"Tst123456"
00003,"01/8979898" ,""
The output should look like this:
01-1234567,00001... (2 Replies)
Discussion started by: Subbeh
2 Replies
3. Shell Programming and Scripting
Hello all
I have a strings like
" Watch news 24x7 "."x-wars is glowing"
" Watch news like 24 x 7"."x-mas will be celebrated"
" Dimensions of box is 24x23x47 ".
I have to remove the x(by) in between the number. If i just replace x, it will also remove all x's from text which i do not want.... (1 Reply)
Discussion started by: vasuarjula
1 Replies
4. Shell Programming and Scripting
Hi All,
I need the perl version of the below sed command:
sed 's/abc.*/&.txt/g' <filename>
Because I'm trying to do some replacement recursively using perl and the above replacement is replacing the abc* with "&.txt" exactly.
Thanks,
Arun (9 Replies)
Discussion started by: arun_maffy
9 Replies
5. Shell Programming and Scripting
Hi friends,
I want to substitute "a ='....'," with ":" in everywhere in a string using Perl.
Details:
----------
my $str= " c1='fgfasfgasggfgff.,akhkhahha', c2='bbbn', c3='hg5 sh' ";
Required o/p: $str= " c1:c2:c3 "
I tried as below:
$str=~ s/=\'.*\',/:/g ;
print "str=... (14 Replies)
Discussion started by: Niroj
14 Replies
6. Shell Programming and Scripting
Hi,
I have a properties file (myprop.properties) which contains some values:
@oneValue@==tcp://localhost:1234
@twoValue@==tcp://localhost:4563
@threeValue@==tcp://localhost7895
I have a xml file (myXmlFile.xml)which contains some tokens:
<application name="aTest">
<NameValuePair>
... (3 Replies)
Discussion started by: ctrl-alt-del
3 Replies
7. Shell Programming and Scripting
Hey ppl,
Could u tell me how to replace such a string
xyz->x with XYZ(x), where x can be any variable accessible by pointer to structure, xyz
in an entire file? (3 Replies)
Discussion started by: laxmi
3 Replies
8. UNIX for Advanced & Expert Users
Hey ppl,
Could u tell me how to replace such a string
xyz->x with XYZ(x), where x can be any variable accessible by pointer to structure, xyz
in an entire file? (1 Reply)
Discussion started by: laxmi
1 Replies
9. Shell Programming and Scripting
I have lines in a file that look like this:
machine: machinea
machine: machineb
machine: randomwhatevermachine
I want to replace the machine lines with:
machine: machinec
I tried
perl -pi -e "s/#machine:\?*/machine: machinec/" filename
But this ended up doing this:
... (2 Replies)
Discussion started by: Lindarella
2 Replies
10. UNIX for Dummies Questions & Answers
Hi!
I've the following script code with an input parameter:
sed 's/oldstring/$1/g' myfile > newfile
(I launch it with comman line: $ MyShell newstring)
Problem: the substituion doesn't work (oldstring becomes $1, instead of newstring). How could I solve this situation?
Thanks, ... (2 Replies)
Discussion started by: pciatto
2 Replies