HI,
Suppose I have thousand files in one directory and they can keep increasing ie
/home/rooh
Then I want to create a batch of 100 files and then compress that batch file and ftp them somewhere else. And morever the files in the batch will be moved to somewhere else.
Can you please help... (21 Replies)
I'm looking after part of an application which batches up files concatanates them together and then moves the concatanated files to another directory. The problem I have is that the box runs Windows 2003 and UNIX shell emulation is provided by MKS Toolkit, when 10,000 or more files arive in the... (1 Reply)
I would like to parse a file and use each record to create a unique file
where the name of the file created is taken from the 3rd field.
Example: here are 3 records.
000007 0110 07-0001583 20060802132213 20060801112601
000007 0110 07-0001584 ... (4 Replies)
Hello,
I have a text file in below format, how do I put a header and assign field names to the file with either AWK or SED
STRT~ VA ~23606 ~TM14~8506~1485 (page 1)
STRT~ VA ~23662 ~TM17~8362~1783 (page 2)
STRT~ VA ~23662 ~TM17~8362~1783
STRT~ VA ~23662 ~TM17~8362~1783
STRT~ VA ~23662... (1 Reply)
Hello all
I have a file with below data, I need to add a third column as XXXX if the first coloumn (H180620081) last number is "1"
and YYYY if the first coloumn last number is "2"
Can it be done with AWK, I would appreciate if anyone could help me ou with this.
H180620081 31310 ... (11 Replies)
Hi all.
I have a problem at work which I have managed to break down into a simple test scenario:
I have written a monitoring script that outputs every second the status of various processes, but for now, lets just print the date
input.sh:
while true
do
date
sleep 1
done
This... (9 Replies)
Hi,
Despite reading the Conditional Statements chapter in the O'Reilly Sed & Awk book several times and looking at numerous examples, I cannot for the life of me get any kind of if ... else statement to work in my awk scripts! My scripts work perfectly (as they are written at least) and do what... (4 Replies)
Hi there, greetingt to everybody.
I have configured syslog-ng to get messages over UDP saving logs into a text file, it works fine.
I need to store the content of this file in several files depending from some criteria that I try to explain you with some examples :
Suppose the content of my log... (5 Replies)
$ awk -f awk1.awk
Where awk1.awk reads:
BEGIN {
printf ("Name = Smith, Richard" > "awk1" \n)
printf ("Name = Johnson, Waylan" > "awk1" \n)
printf ("Name = Brown, Pat" > "awk1" \n)
}
If I get rid of "\n", awk1 file gets created but all the names... (3 Replies)
Hi,
I was trying to change the value of the 4th column (put '1' in the 4th column of each row). My awk command is:
awk -F, '{$3=1;}1' OFS= input.txt > ./test_out.txt
My input file is:
a 1 2 31
b 4 5 61
c 7 8 91
My output file (test_out.txt)is:
a 1 2 31
b 4 5 61
c 7 8 91
What... (4 Replies)
Discussion started by: pc2001
4 Replies
LEARN ABOUT LINUX
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)