10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to add a condition to the below perl that will capture the GTtag and place a specific string in the last field of each line. The problem is that the GT value used is not right after the tag rather it is a few fields away. The values should always be 0/1 or 1/2 and are in bold in the... (12 Replies)
Discussion started by: cmccabe
12 Replies
2. Shell Programming and Scripting
Below code extracts multiple field values from XML into array and prints all in one line.
perl -nle '@r=/(?: jndiName| authDataAlias| value| minConnections| maxConnections| connectionTimeout| name)="(+)/g and print join ",",$ENV{tIPnSCOPE},$ENV{pr
ovider},$ENV{impClassName},@r' server.xml
... (4 Replies)
Discussion started by: kchinnam
4 Replies
3. Shell Programming and Scripting
Hi, i want to add a line at the beginning of every file in a directory.
perl -i.bkp -p -e 'print "#include /verif/pdd1/exu/sxs/6sTest/reset/dfu/top_level.reset\n" if $. == 1' *.reset
But this command is updating only the first file in the directory. I think this is because $. is not resetting... (3 Replies)
Discussion started by: twistedpair
3 Replies
4. Programming
Hi All
I need to add a line to a file but after a certain block of text is found
The block of text looks like this
<RDF:Description RDF:about="urn:mimetype:video/quicktime"
NC:value="video/quicktime"
and i need to add this in the next line down ( note there is... (4 Replies)
Discussion started by: ab52
4 Replies
5. Shell Programming and Scripting
Hi all,
I want to search for a line in a file using perl script and add a line above that line.Can any one suggest me command or code to that using script.
Thanks BHarath (5 Replies)
Discussion started by: bharathece
5 Replies
6. Shell Programming and Scripting
Hi,
I have the following lines that I would like to see in an array for easy comparisons and printing:
Example 1:
field1,field2,field3,field4,field5
value1,value2,value3,value4,value5Example 2:
field1,field3,field4,field2,field5,field6,field7... (7 Replies)
Discussion started by: ejdv
7 Replies
7. Shell Programming and Scripting
Hi Gurus,
I need to cut single record in the file(asdf) to multile records based on the number of bytes..(44 characters). So every record will have 44 characters. All the records should be in the same file..to each of these lines I need to add the folder(<date>) name.
I have a dir. in which... (20 Replies)
Discussion started by: ram2581
20 Replies
8. Shell Programming and Scripting
hi all
need a perl script to add a line into a file
thanks with anticipation (2 Replies)
Discussion started by: karthikn7974
2 Replies
9. Shell Programming and Scripting
Hi,
below is the software list of lines I have,
MozillaSrc 1.7.8.00.00 Mozilla 1.78 Source Distribution
NFS B.11.11 ONC/NFS; Network-File System,Information Services,Utilities
NParProvider B.11.11.01.04.01.01 nPartition Provider
NPartition ... (7 Replies)
Discussion started by: acomd2
7 Replies
10. Shell Programming and Scripting
Hey guys,
I have a text file full of data and all I want to do with the thing is add the file extension name to the first line of the file. Here is what I have so far. I can't remember how to append to the first line of the file without deleting the exsisting data.
#!/usr/local/bin/perl
... (5 Replies)
Discussion started by: kingdbag
5 Replies