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)
Hi guys, I'm trying to create a one line command that does the following.
I will post my command first so you can get the idea better:
ls -larht | awk '{print $4}' | uniq | xargs grep *
__________
ls -larht | awk '{print $4}' | uniq
This will post the name of the groups of each file... (2 Replies)
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)
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)
I have googled around a bit and could not find an answer to how this works:
echo $STRING | awk '$0=$NF' FS=
I know what each part is doing. The record is being set to equal the last field and the field separator is being set to null so that each character is considered a field. Why can FS= be... (4 Replies)
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)
I have a data base of part numbers:
AAA Thing1
BBB Thing2
CCC Thing3
File one is a list of part numbers:
XXXX AAA234
XXXX BBB678
XXXX CCC2345
Is there a sed one-line that would compare a data base with and replace the part numbers so that the output looks like this?
XXXX AAA234... (7 Replies)
Discussion started by: jimmyf
7 Replies
LEARN ABOUT DEBIAN
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)