08-18-2009
Hi.
It should work.. it works for me!
Use the other one instead then
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I've a question on awk. In English I want to:
(a) open a file, (b) search through the file for records where length of field15 > 20 characters and (c) print out some fields in the record.
I've written the following and it works OK. The trouble is this will ALWAYS write out the column... (5 Replies)
Discussion started by: eff_cee
5 Replies
2. Shell Programming and Scripting
Hello I have the following awk script:
BEGIN {
{FS = " " }
{print "\t\tIllegal Loggon Attempts on MAIL\n"}
{"date" | getline d}
{printf "\t %s\n",d }
{print "Loggon Name\t\t\t Number of Attempts\n"}
... (2 Replies)
Discussion started by: mojoman
2 Replies
3. Shell Programming and Scripting
I'd like to define an alias to awk's begin statement since I use awk with different delimiters all the time and it is tiresome to type awk '{OFS="\t";FS="\t"}{BLAH BLAH}' every time. The problem is that bash won't let me make an alias with an open quote, which is necessary for the BEGIN alias to... (3 Replies)
Discussion started by: baconbasher
3 Replies
4. Shell Programming and Scripting
I am beginner in awk
awk 'BEGIN{for(i=1;(getline<"opnoise")>0;i++) arr=$1}{print arr}'
In the above script, opnoise is a file, I am reading it into an array and then printing the value corresponding to index 20. Well this is not my real objective, but I have posted this example to describe... (1 Reply)
Discussion started by: akshaykr2
1 Replies
5. Shell Programming and Scripting
Hi,
Contents of BBS-list file:
foo
foo
foo
awk '
BEGIN { print "Analysis of \"foo\"" }
/foo/ { ++n }
END { print "\"foo\" appears", n, "times." }' BBS-list
Output:
Analysis of "foo"
"foo" appears 3 times.
awk ' (3 Replies)
Discussion started by: cola
3 Replies
6. Shell Programming and Scripting
I'm new to awk, trying to understand the basics.
I'm trying to reset the counter everytime the program gets a new file to check.
I figured in the BEGIN part it would work, but it doesn't.
#!/bin/awk -f
BEGIN {counter=0}
{
sum=0
for ( i=1; i<=NF;... (1 Reply)
Discussion started by: guitarist684
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have written below script to begin if the line has n
#!/bin/ksh
/usr/xpg4/bin/awk {/ n / 'BEGIN {X = "01"; X = "02"; X = "03"; X = "04";
X = "05"; X = "06"; X = "07"; X = "08";
X ="09"; X = "10"; X = "11"; X = "12"; };}
NR > 1 {print $1 "\t" $5 "," X "," $6 " " $7}'} input.txt |... (9 Replies)
Discussion started by: stew
9 Replies
8. Shell Programming and Scripting
My code fails to do anything if I've BEGIN block in it:
Run the awk script as:
awk -f ~/bin/sum_dupli_gene.awk make_gene_probe.txt
#!/usr/bin/awk -f
BEGIN {
print ARGV
#--loads of stuff
}
END{
#more stuff
} (14 Replies)
Discussion started by: genome
14 Replies
9. UNIX for Beginners Questions & Answers
Hi there,
I'm working with file more than 400K lines, 60 columns. Column count is going to be multiple of 12: 60, 12, 72 or so.
NF/12 gives me on how many iterations I've to do to check certain value.
For example: 7, 14th if only 24 columns in file.
7th, 14th and 21st if 36 columns in... (6 Replies)
Discussion started by: genome
6 Replies
10. Shell Programming and Scripting
Hi,
diffcount=`awk 'BEGIN { while ( getline < "/scripts/matt/text.server1.reference" ) { arr++ } } { if (!( $0 in arr ) ) { print } }' $TMPDIR/$(basename $0 .sh) | wc -l`
if ]; then
OK="OK - No change in the interfaces status"
elif ]; then
DIFF=`awk 'BEGIN {... (4 Replies)
Discussion started by: nms
4 Replies
AIC(4) BSD/i386 Kernel Interfaces Manual AIC(4)
NAME
aic -- Adaptec AIC-6260 and AIC-6360 SCSI driver
SYNOPSIS
device aic
In /boot/device.hints:
hint.aic.0.at="isa"
DESCRIPTION
The aic driver provides support for the Adaptec AIC-6260 and AIC-6360 SCSI controller chips. Many systems that use these controller chips do
not have a boot ROM and therefore cannot be booted from.
HARDWARE
The adapters supported by the aic driver include:
o Adaptec AHA-1505 (ISA)
o Adaptec AHA-1510A, AHA-1510B (ISA)
o Adaptec AHA-1520A, AHA-1520B (ISA)
o Adaptec AHA-1522A, AHA-1522B (ISA)
o Adaptec AHA-1535 (ISA)
o Creative Labs SoundBlaster SCSI host adapter (ISA)
o Adaptec AHA-1460, AHA-1460B, AHA-1460C, AHA-1460D (PC Card)
o Adaptec AHA-1030B, AHA-1030P (PC98)
o NEC PC-9801-100 (PC98)
SEE ALSO
aha(4), ahb(4), ahc(4), cd(4), ch(4), da(4), intro(4), sa(4)
BUGS
The driver does not work well with multiple devices on the SCSI bus. The driver works well with devices like CDROMs and Tape drives. The
driver works not so well with disk drives. The PC Card version appears to work better than the ISA version, but that may be due to differing
levels of testing of the devices.
BSD
November 8, 2003 BSD