10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys I am trying to figure out how to match a pattern with a regex up to a full blank line. I will show you what I mean with this example:
example A
movie name: ted
movie name: TMNT
movie name: Jinxed
example B
movie names:
Gravity
Faster
Turbo
song titles:
dont
hello
problem (8 Replies)
Discussion started by: acoding
8 Replies
2. 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
3. Shell Programming and Scripting
Hi,
I need to join two files together with one common value in a column. I think I can use awk or join or a combination but I can't quite get it.
Basically my data looks like this, with the TICKER columns matching up in each file
File1
TICKER,column 1, column, 2, column, 3, column 4
... (6 Replies)
Discussion started by: unkleruckus
6 Replies
4. Shell Programming and Scripting
Hi, I have text file:
Name: xyz
Gender: M
Address: "120_B_C; ksilskdj; lsudlfw"
Zip: 20392
Name: KLM
Gender: F
Address: "65_D_F; wnmlsi;lsuod;,...."
Zip:90233I want to insert 2 new lines before the 'Address: ' line deriving value from this Address line value
The Address value in quotes... (1 Reply)
Discussion started by: ysrini
1 Replies
5. Shell Programming and Scripting
I am trying to Join all the lines matching similar pattern.
Example ;
I wanted to join all the lines which has sam to a single line.
In next line, i wanted to have all the lines with jones to a single line....etc
> cat sample.txt
sam 2012/11/23
sam 2012/12/5
sam 2012/12/5
jones... (2 Replies)
Discussion started by: evrurs
2 Replies
6. Shell Programming and Scripting
Hi
I had two files like below.
file-1
101001234567890
101001234567891
101001234567892
101001234567893
101001234567894
101001234567895
101001234567896
101001234567897
101001234567898
101001234567899
file-2 (6 Replies)
Discussion started by: p_sai_ias
6 Replies
7. Shell Programming and Scripting
Dear Forum,
Full title of the topic would be: "Join 3 or more files using matching column without full list in any of these columns"
I have several, typically 3 or 4 files which I need to join, something like FULL JOIN in slq scripts, all combinations of matches should be printed into an... (3 Replies)
Discussion started by: cyz700
3 Replies
8. Shell Programming and Scripting
Hello,
Did anyone know how to write a perl script to merge the multi-line into a single line where each line with start at timestamp
Input-->
timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc; (5 Replies)
Discussion started by: happyday
5 Replies
9. Shell Programming and Scripting
another question that could possibly be answered with awk...
#cat filename
ab cd ef:ghi:jk lm:nop qrs
ab cd ef:ghi:jk lm:nop qrs
ab cd ef:ghi:jk lm:nop qrs
ab cd ef:ghi:jk lm:nop qrs
# for x in `awk 'sub($1" +"$2" +","",$0) ' filename`; do echo $x; done
ef:ghi:jk ... (8 Replies)
Discussion started by: prkfriryce
8 Replies
10. Shell Programming and Scripting
Hi All,
I need a shell script to join a line to the line that follows it. But I shouldn't do it for all the lines. I need to join a line having the character say '&' at the end of the line & need to join the line that follows it.
E.g
Input
1. This is the first line &
2. and the second... (6 Replies)
Discussion started by: shashi_kiran_v
6 Replies