06-08-2009
That is the case in direction for the last replay i want a shell script to get from the user when it is called at least two strings then in the script pass it over to a awk script and to check how many arguments have been passed.
I use awk -F"[: /:]" to seperate the string that have been passed by the user to sub strings ,and i think using them in the awk script is ok of $1,$2...
How can i do it?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am very new to scripting in UNIX and in need of help. I am creating a program that will check a file that has a target time in the form of HH:MM:SS before another program can begin executing. The file with the target time will only have that target time in it and nothing else.
Is there any way... (1 Reply)
Discussion started by: mosammey
1 Replies
2. UNIX for Dummies Questions & Answers
I am very new to scripting in UNIX and in need of help. I am creating a program that will check a file that has a target time in the form of HH:MM:SS before another program can begin executing. The file with the target time will only have that target time in it and nothing else.
Is there any... (4 Replies)
Discussion started by: mosammey
4 Replies
3. Shell Programming and Scripting
I have a file ("modtest") in which I want to update the last date/time block in the lines beginning with a period. Here is a sample:
.ROMULT 10150908EDT 10270908EDT 10010908EDT RANGE
RAWV2 1.00
.ROMULT 10150908EDT 10270908EDT 10010908EDT FGROUP
CHOWANRV 1.00
.RRIMULT 10150908EDT... (10 Replies)
Discussion started by: chrismcg24
10 Replies
4. Shell Programming and Scripting
This gives:
grep "qprt -o -dp -N 1 -P" printfile.log.1216 |awk '{print $7, $9}' |grep lpc1z
The output like below:
lpc1z /cerner/d_prod/print/ccltemp4235396d030a.dat.tmp.1216075330]
lpc1z /cerner/d_prod/print/ccltemp4235396d036a.dat.tmp.1216075634]
lpc1z... (2 Replies)
Discussion started by: Daniel Gate
2 Replies
5. Shell Programming and Scripting
Hello
does anyone know of an awk that will extract log file entries between a specific date and time range, eg:
awk '/15\/Dec\/2010:16:10:00/, /15\/Dec\/2010:16:15:00/' access_log
but one that works?
Or a free command line log file analysis tool/script?
I'd like to be able to view... (2 Replies)
Discussion started by: competitions
2 Replies
6. Shell Programming and Scripting
Looking for some help and usually when I do a search this site comes up. Hopefully someone can give me a little direction as to how to use one of these two commands to achieve what I'm trying to do.
What am I trying to do?
I need to take the time value in epoch format returned from the... (5 Replies)
Discussion started by: minigts
5 Replies
7. Shell Programming and Scripting
File contains below data,how to validate the date using awk command or any command.
date formate is fixed as "YYYYMMDD"
test1|20120405
test2|20121405
output should be:
test1|20120405
Thanks (2 Replies)
Discussion started by: bmk
2 Replies
8. Shell Programming and Scripting
hey guys.
the following line is a line taken from apache's access_log
10.10.10.10 - jdoe "GET /images/down.gif HTTP/1.1" 304
I'm concerned about the field that has the date and time in it.
if assuming the delimiter in the file is a space, then the fourth field will always have the date... (5 Replies)
Discussion started by: SkySmart
5 Replies
9. UNIX for Dummies Questions & Answers
I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk.
I tried
This is how each line of the file looks like, different date and time in this format
Sun Aug 19 08:33:45 EDT 2012, user1(108.6.217.236) all: test on the 17th
... (2 Replies)
Discussion started by: bkkid
2 Replies
10. Shell Programming and Scripting
hi
i want to validate the date and time in filename
filename : mohan.moh.ccyymmdd.ccyymmdd.hhmmss.txt
mohan_moh.20151222.20151222.122442.txt
i want code that check that date given in filename 20151222 in this format ccyymmdd else it mark file is not valid used in my OS detail is AIX 6... (12 Replies)
Discussion started by: MOHANP12
12 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)