Sponsored Content
Full Discussion: awk errors
Top Forums Shell Programming and Scripting awk errors Post 75731 by billy5 on Tuesday 21st of June 2005 04:46:43 PM
Old 06-21-2005
OK, this is what I want.
There is a file like this:

ISAtext1
GStext2
text3
text4
...
textn
GE
IEA

I want to do this:

if line begins ISA - do command1.
if line begins GS -do command2.
all other lines (means all except ISA, GS, GE, IEA) - do command3. - how to write this in awk???
if line begins GE - do commad4
if line begins IEA -do command5.

Hope I was more clear.

Thanks
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Help with errors

I am very new to the world of Unix, in the middle of a crash course as I write this due to a system failure for my company. This system went down approximately 24 hours ago due to some apparent thunderstorms that passed through. The problem is that my company, like many others, has laid off... (5 Replies)
Discussion started by: Phaedirean
5 Replies

2. Shell Programming and Scripting

AWK Syntax errors :/

I recently started as an intern and my manager wanted to see how well I would handle Korn Bourne shell scripting without any prior experience, I have prior programming experience but I keep running into syntax errors with AWK. Please take a look at my simple code and tell me what stupid mistake... (6 Replies)
Discussion started by: yongho
6 Replies

3. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies

4. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

5. UNIX for Dummies Questions & Answers

X errors

I'm trying to set up x2x between my desktop and laptop, and as a precondition to that, I'm just trying to get each to be able to display programs on the other (e.g. "desktop$ xterm -display laptop:0"). OS is Ubuntu 5.10 and X version is X.org 6.8.2 I've set up X to run without -nolisten, and... (1 Reply)
Discussion started by: vertigo23
1 Replies

6. Programming

errors....

hi i have written a program to display files in a directory but it doesnt compile on the sun/solaris system.... im using gcc(inbuilt compiler) im generally used to working on a windows environment so maybe im overlookiing something ive added comments to help readability of the program i also... (2 Replies)
Discussion started by: anything2
2 Replies

7. UNIX for Dummies Questions & Answers

Major OS errors/Bash errors help!!!!

Hi all, dummy here.... I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies

8. Programming

Errors in Perl when using awk command

Hi Guys, Hope everyone is fine :) I have this code below: #!/usr/bin/perl $num_of_files=`ls | grep -v remover | wc -l`; $remover=`ls -lrt | grep -v total | grep -v remover | head -1 | awk '{print $8}' | rm \`xargs\``; if ($num_of_files>3) { system ($remover); } When I... (3 Replies)
Discussion started by: rymnd_12345
3 Replies

9. Shell Programming and Scripting

Solaris script using awk giving errors - please advise

I'm using solaris 10 Scenario as follows I have a logfile with 2 columns: column 1 = source directory + filename column 2 = destination directory + filename Using cron, my script polls for new files and adds them to the logfile ($ELOG) as described above. Using sed, the distination... (2 Replies)
Discussion started by: davidra
2 Replies

10. Shell Programming and Scripting

[Solved] awk Errors on notation

can someone spot what i'm doing wrong here: awk 'BEGIN{printf("%0.2f", 1 / 2649320) * 100}' i get this error: awk: line 1: syntax error at or near * then i do this and get the answer i'm trying to avoid: awk 'BEGIN{print(1 / 2649320) * 100}' 3.77455e-05 (7 Replies)
Discussion started by: SkySmart
7 Replies
PNP(4)							 BSD/i386 Kernel Interfaces Manual						    PNP(4)

NAME
pnp -- support for ``Plug and Play'' (PnP) ISA devices DESCRIPTION
The pnp driver enumerates ISA devices which support ``Plug and Play ISA Specification'' in the system. It assigns ISA bus resources (inter- rupt line, DMA channel, I/O ports, and memory region) to each device and activates it. If it cannot assign necessary resources to a PnP ISA device without causing conflict with other devices in the system, the device will not be activated and will be unavailable to programs. CAVEATS
It is not possible to disable individual PnP ISA devices. The pnp driver will find all devices conforming the PnP ISA specification and try to activate them all. There is no way to explicitly assign particular resource to the PnP ISA device. The resource assignment is fully automatic and there is no provision for manual override. SEE ALSO
pnpbios(4) STANDARDS
Intel and Microsoft, Plug and Play ISA Specification, Version 1.0a, May 5, 1994. Clarifications to the Plug and Play ISA Specification, Version 1.0a, December 10, 1994. HISTORY
The pnp driver first appeared in FreeBSD 2.2.5. It has been substantially updated in subsequent versions. AUTHORS
PnP support was originally written for FreeBSD 2.2.5 by Luigi Rizzo, based on initial work done by Sujal Patel. BSD
September 20, 2001 BSD
All times are GMT -4. The time now is 08:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy