10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below code is a simple modified sample from a file with millions of lines containing hundreds of extra columns xxx="yyy" ...
<app addr="1.2.3.4" rem="1000" type="aaa" srv="server1" usr="user1"/>
<app usr="user2" srv="server2" rem="1001" type="aab" addr="1.2.3.5"/>What's the most efficient awk... (2 Replies)
Discussion started by: cabrao
2 Replies
2. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
3. Shell Programming and Scripting
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies
4. Shell Programming and Scripting
Hello,
I have two files...
File #1
1 3
2 5
File #2
3 5 3
1 3 7
9 1 5
2 5 8
3 3 1
I need to extract all lines from File #2 where the first two columns match each line of File #1. So in the example, the output would be:
1 3 7
2 5 8
Is there a quick one-liner that would... (4 Replies)
Discussion started by: palex
4 Replies
5. UNIX for Dummies Questions & Answers
example input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 (3 Replies)
Discussion started by: kenneth.mcbride
3 Replies
6. Shell Programming and Scripting
How to combine 3 find statements into 1-liner?
find statements:
cd ${dir1} ; find . ! -name . -prune -type f | xargs file | grep -i ascii | cut -f1 -d: | xargs grep -l "${searchtxt}"
cd ${dir2} ; find . ! -name . -prune -type f | xargs file | grep -i ascii | cut -f1 -d: | xargs grep -l... (4 Replies)
Discussion started by: ux4me
4 Replies
7. Shell Programming and Scripting
Using these 2 comands to concatenate both outputs into single file:
cat testdata | awk 'BEGIN { FS="\n"; RS=""; } /<pattern1>/ {print}' > testdata1
cat testdata| awk '/<pattern2>/,EOF' >> testdata1
is it possible to combine both "awk" into 1-liner?
pls advise and thanks in advance. (5 Replies)
Discussion started by: ux4me
5 Replies
8. UNIX for Dummies Questions & Answers
I need a one liner to"
find /pattern/
print from x lines before "pattern" to y lines after "pattern" (3 Replies)
Discussion started by: kenneth.mcbride
3 Replies
9. Shell Programming and Scripting
input
a 100 200 300
b 400 10
output
a 100
a 200
a 300
b 400
b 10
Thanx (6 Replies)
Discussion started by: repinementer
6 Replies
10. Shell Programming and Scripting
I have three files and I have to do something like this:-
File A
1232|||1111 0001|||
1232|||2222 0001|||
1232|||4444 0001|||
1232|||4444 0001|||
File B
1232|1111 0001|||002222||
1232|2222 0001|||003333||
1232|3333 0001|||004444||
File C
1232|002222|||
1232|005555|||
Files are... (4 Replies)
Discussion started by: kishal
4 Replies