10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello to all,
I have:
X="string 1-"
Y="-string 2"
Z="string 1-20-string 2"In the position of the number 20 could be different numbers, but I'm interest only when the number is 15, 20,45 or 70.
I want to include an IF within an awk code with a regex in the following way.
... (12 Replies)
Discussion started by: Ophiuchus
12 Replies
2. Shell Programming and Scripting
Hello I have a file like :
20120918000001413 | 1.17.163.89 | iSelfcare | MSISDN | N
20120918000001806 | 1.33.27.100 | iSelfcare | 5564 | N
....
I want to extract all lines that have on 4th field (considering "|" the separator ) something other than just digits. I want to do this using a... (5 Replies)
Discussion started by: black_fender
5 Replies
3. Shell Programming and Scripting
Experts and Informed folks,
Need some help here in parsing the log file.
1389675 Opera_ShirtCatalog INSERT INTO Opera_ShirtCatalog(COL1, COL2) VALUES (1, 'TEST1'), (2,'TEST2');
1389685 Opera_ShirtCatlog_Wom INSERT INTO Opera_ShirtCatlog_Wom(col1, col2, col3) VALUES (9,'Siz12, FormFit',... (12 Replies)
Discussion started by: ManoharMa
12 Replies
4. Shell Programming and Scripting
Hi all the experts out there,
I am totally new to perl and I was given an assignment by using Perl to find the 2nd element of each line in each curly bracket which made up of 5 elements.
Expected result should like this:
Type: VCC Pin_name: AK32,AL32,AH21,.....
Type: NC Pin_name:... (2 Replies)
Discussion started by: killbanne
2 Replies
5. Shell Programming and Scripting
Hi all,
Can someone tell me what's the (g)awk equal of this simple regex to find ip addresses in urls:
egrep "^http://{1,3}\.{1,3}\.{1,3}\.{1,3}(:{1,5})?/"Input:
http://10.0.0.1/query.exe
http://11y10x09w:80/howaboutme
http://192.168.100.190:1234/takeme.gpg
Output:... (8 Replies)
Discussion started by: r4v3n
8 Replies
6. UNIX for Dummies Questions & Answers
Hi can you suggest in this regard
The sample.txt conatins the data
name lines type
sam 12 txt
sam 24 xls
sam 36 pdf
ram 32 txt
ram 45 sxls
ram 58 word
sam 92 jpeg
sam 21 gif
sam 22 ltf
from the data i need to sum all line... (5 Replies)
Discussion started by: krashraj
5 Replies
7. Shell Programming and Scripting
hi everyone
suppose my input file is
ABC-12345
ABCD-12345
BCD-123456
i want to search the specific pattern which looks like
-
in a file so i used this command
cat $file | awk ' { if ($0 ~ /-/) { print } }'
so it gives me the result as
ABCD-12345
BCD-12345
BCD-12345
... (31 Replies)
Discussion started by: aishsimplesweet
31 Replies
8. Shell Programming and Scripting
Hello,
I am trying to covert a for statement into a single awk script and I've got everything but one part.
I also need to execute an external script when "not found", how can I do that ?
for TXT in `find debugme -name "*.txt"` ;do
FPATH=`echo $TXT | sed 's/\(.*\)\/\(.*\)/\1/'`
how... (7 Replies)
Discussion started by: TehOne
7 Replies
9. Shell Programming and Scripting
I have a regexp that I wish to match against every line of a file using awk.
But I do not want to substitute it or select the line.
I want to pull the matched text out and put it in a different file, line by line.
What is the correct awk usage to *extract* a regexp and put it in another... (11 Replies)
Discussion started by: Enobarbus37
11 Replies
10. Shell Programming and Scripting
Hi!
I want to made a program that will generate code like this:
{{Navedi XYZ
|avtor=XYZ1
|naslov=XYZ2
|leto_izzida=XYZ3
|zalozba=XYZ4
|kraj=XYZ5
|isbn=XYZ6
|cobiss_id=XYZ7
}}
from input like this:
<b> ODGOVORNOST............. : <a... (5 Replies)
Discussion started by: smihael
5 Replies
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)