10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I've got this output:
# cat test2.txt
TM1ITP1-TMNLSTP1 SLC00=0,SLC01=0,SLC02=0,SLC03=0
if I just use cat test2.txt | tr "," "\n" I'll end up very near to what I'm trying to achieve:
TM1ITP1-TMNLSTP1 SLC00=0
SLC01=0
SLC02=0
SLC03=0
But how can i eventually add the term... (1 Reply)
Discussion started by: nms
1 Replies
2. Shell Programming and Scripting
Hello,
I'm looking to check only the first line of a file to see if it is a format string, like
# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string.
I'd... (3 Replies)
Discussion started by: f77hack
3 Replies
3. 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
4. Shell Programming and Scripting
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Discussion started by: thefang
10 Replies
5. Shell Programming and Scripting
Is it possible to replace a line of text within a file while it's closed with a single command or a script? Please show me an example or point me to a webpage that shows an example. The file has this line of text:
LoginGraceTime 100
I want to replace it with the following:
... (2 Replies)
Discussion started by: wdg74
2 Replies
6. Shell Programming and Scripting
I have file like this
"copy table_name from filea.txt on node replace delimiter '|';"
"copy table_name from fileb.txt on node replace delimiter '|';"
"copy table_name from filec.txt on node replace delimiter'|';"
"copy table_name from filee.txt on node replace delimiter '|';"
"copy... (1 Reply)
Discussion started by: nnani
1 Replies
7. Shell Programming and Scripting
The Problem
I have n files all named "conf.cfg", each of which contain a line that reads: "MyVar=XXX", where XXX can be any value.
I have a second file called report.xml, that might read:
<Reports>
<Report>Report1</Report>
<Report>Report2</Report>
<Report>Report3</Report>
</Reports>
I... (1 Reply)
Discussion started by: Flang
1 Replies
8. Shell Programming and Scripting
Hi,
I have the following text which I want to search and replace using perl and sed. I would appreciate any help.
Please notice the file contains schema name with a single dot and a double dot . &&WEBDIR_SCHEMA. and &&WEBDIR_SCHEMA .. }
I would like to change it to the acutal schema... (5 Replies)
Discussion started by: jville
5 Replies
9. Shell Programming and Scripting
I have played with this for some time but i dont seem like i am getting it right. I am trying to change the delimiters on a file so i can import it into a database. this file has rows of data separated by enter
Right now the delimiters are represented by tabs and " ".
e.g.
"dlfkldfs... (9 Replies)
Discussion started by: salemh
9 Replies
10. Shell Programming and Scripting
I must remove hex characters 0A and 0D from several fields within an MS Access Table. Since I don't think it can be done in Access, I am trying here.
I am exporting a Table from Access (must be fixed length fields, I think, for my idea to work here) into a text format.
I then want to run a... (2 Replies)
Discussion started by: BAH
2 Replies