10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I am trying to format my csv file. When I spool the file using sqlplus the single row output is wrapped on three lines.
Somehow I managed to format that file and finally i am trying to make the multiple line on single line.
The below command is working fine but I need to pass the... (3 Replies)
Discussion started by: RJSKR28
3 Replies
2. Shell Programming and Scripting
At the top of the XYZ file, I need to insert the ABC data value of column 2 only when ABC column 1 matches the prefix XYZ file name (not the ".txt"). Is there an awk solution for this?
ABC Data
0101 0.54
0102 0.48
0103 1.63
XYZ File Name
0101.txt
0102.txt
0103.txt
... (7 Replies)
Discussion started by: ncwxpanther
7 Replies
3. 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
4. Shell Programming and Scripting
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies
5. Shell Programming and Scripting
Hi, i need help with my shell script
I have a file input.txt containing the following contents
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/wine
/usr/share/doc/wine/copyright
/usr/share/doc/wine/changelog.Debian.gz
I need output as
/usr/share/doc/wine
/usr/share/doc/wine/copyright... (3 Replies)
Discussion started by: Amit0991
3 Replies
6. Shell Programming and Scripting
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
Discussion started by: siriche
1 Replies
7. Shell Programming and Scripting
Sample file:
This is line one,
this is another line,
this is the PRIMARY INDEX line
l ;
This is another line
The command should find the line with “PRIMARY INDEX” and remove the last character from the line preceding it (in this case , comma) and remove the first character from the line... (5 Replies)
Discussion started by: KC_Rules
5 Replies
8. Shell Programming and Scripting
Hello to all,
I have this file
2002 1 23 0 0 2435.60 131.70 5.60 20.99 0.89 0.00 285.80 2303.90
2002 1 23 15 0 2436.60 132.90 6.45 21.19 1.03 0.00 285.80 2303.70
2002 1 23 ... (6 Replies)
Discussion started by: joggdial3000
6 Replies
9. Shell Programming and Scripting
Hi all,
I was wondering if someone could tell me a way to extract from a file lines where you search for a phrase and then also extract the next X lines after it (i.e. take a block of text from the file)?
Example
{
id=123
time=10:00:00
date=12/12/09
{
........
... (6 Replies)
Discussion started by: muay_tb
6 Replies
10. Shell Programming and Scripting
i am not sure what i should be using but would like a simple command that is able to insert a certain block of text that i define or from another text file into a xml file after a certain match is done
for e.g
insert the text
</servlet-mapping>
<!-- beechac added - for epic post-->... (3 Replies)
Discussion started by: cookie23patel
3 Replies