Sponsored Content
Full Discussion: awk not equal
Top Forums UNIX for Advanced & Expert Users awk not equal Post 303039243 by MadeInGermany on Friday 27th of September 2019 02:59:36 AM
Old 09-27-2019
No, the awk default is to print the whole line if there is a true condition outside an { action } and not followed by an { action }.
Post#1 should work as intended.

I rather suspect that the input file's last line is not newline-terminated.
Some tools handle it, some ignore it.

I see that more and more Java classes produce such non-compiant text files.
This User Gave Thanks to MadeInGermany For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk check for equal - help

Input file: x A 10 y A 10 z A 10 x B 10 y B 12 z B 10 x C 0 y C 0 Required output: x B 10 y B 12 z B 10 i.e. printing only that section (based on 2nd field) for which third field($3) is not equal for all the lines for that 2nd field. Please help (12 Replies)
Discussion started by: uwork72
12 Replies

2. Shell Programming and Scripting

Regex NOT EQUAL help

I have the following line to text: ExecuteQueue Name=default ThreadCount=60 I want to write a sed or awk function that eliminates everything before "ThreadCount" without taking into account what is actually in front of ThreadCount. Meaning there may be text in front of "ThreadCount" other... (6 Replies)
Discussion started by: ArterialTool
6 Replies

3. Shell Programming and Scripting

while [ $x -ge 50 ] + and equal to zero ; then

while + and equal to zero ; then what to punt instead of phrase and equal to zero. it's bash thank you in advance (1 Reply)
Discussion started by: losh
1 Replies

4. Shell Programming and Scripting

awk field equal something, then add something to the field

Hi Everyone, a.txt a b c 1 e e e e e a b c 2 e e e e e the output is a b c 1 e e e e e a 00b c 2 e e e e e when 4th field = '2', then add '00' in the front of 2nd field value. Thanks (9 Replies)
Discussion started by: jimmy_y
9 Replies

5. Shell Programming and Scripting

awk script replace positions if certain positions equal prescribed value

I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX. awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies

6. Shell Programming and Scripting

awk - setting fs to equal any single character

Hi Does anyone know how to set any character as the field separator with awk/nawk on a solaris 10 box. I have tried using /./ regex but this doesnt work either and im out of ideas. thanks (7 Replies)
Discussion started by: chronics
7 Replies

7. Shell Programming and Scripting

Using awk, print all the lines where field 8 is equal to x

Using awk, print all the lines where field 8 is equal to x I really did try, but this awk thing is really hard to figure out. file1.txt"Georgia","Atlanta","2011-11-02","x","","","","" "California","Los Angeles","2011-11-03","x","","","",""... (2 Replies)
Discussion started by: charles33
2 Replies

8. Shell Programming and Scripting

AWK splitting a string of equal parts of 500 chars

Hi , can someone help me how to make an AWK code for splitting a string of equal parts of 500 chars in while loop? Thank you! (4 Replies)
Discussion started by: sanantonio7777
4 Replies

9. Shell Programming and Scripting

awk to print record not equal specific pattern

how to use "awk" to print any record has pattern not equal ? for example my file has 5 records & I need to get all lines which $1=10 or 20 , $2=10 or 20 and $3 greater than "130302" as it shown : 10 20 1303252348212B030 20 10 1303242348212B030 40 34 1303252348212B030 10 20 ... (14 Replies)
Discussion started by: arm
14 Replies
action(3pm)						User Contributed Perl Documentation					       action(3pm)

NAME
OpaL::action - Perl extension for easier handling of what information that should be presented when a action is made. SYNOPSIS
use OpaL::action qw(functionnames); No functions or variables are exported automaticly so you have to specify them here. DESCRIPTION
OpaL::action is a module to allow some better bugtracking and information to be sent to the user/developer. All functions are autoloaded so they will not be loaded into memory if you have not used them before. There are 5 different levels of the information/action. 1. critical 2. error 3. warning 4. message 5. debug FUNCTIONS
setQuitLevel You can set on what errorlevel the program should exit if an error occur. The default level is 2 and you canges it like this: USAGE: "setQuitLevel"(level); setErrorHandler You can set an alternative error handler function (no arguments). The default one is exit. USAGE: "setErrorHandler"(funcname); setDebugLevel You can set on what errorlevel the program should output messages if an error occur. The debug level indicates what type of information that should be presented to the user. USAGE: "setDebugLevel"(level); getQuitLevel You can set on what errorlevel the program should exit if an error occur. USAGE: $foo = "getQuitLevel"; getDebugLevel You can get the debuglevel on which the program should output messages, if an error occurs. USAGE: $foo = "getDebugLevel"; pdebug You can set on what errorlevel the program should exit if an error occur. With the pdebug method you can present information and mark it with a debuglevel using: USAGE: "pdebug"(level, "A sample informational text." [,funcref]); action With this function you can handle and print a message if a function does not work correctly. It will exit the program and print a message with the error level before if the action returns true and if the action_critic is lower or equal to the set error level. If the debug level is high enough it will present the message but without the trailing error message. USAGE: "action"(some_action, "A sample informational text about the action.", how_critical [,funcref]); The last parameter (how_critical) is optional. cmdaction Actually the same as action with the difference that it executes a external command instead. It is almost identical to action(system"a command to execute", ...); USAGE: "cmdaction"("a command to execute.", "A sample informational text about the action.", how_critical, how_quiet [,funcref]); The two last parameter (how_critical) is optional. The last parameter tells how quiet the executing command should be: 0 - extremely quiet (ie: >& /dev/null) 1 - quiet (ie: >& /dev/null) 2 - everything sent to stdout. =back AUTHOR
Ola Lundqvist <ola@inguza.com> SEE ALSO
perl(1). POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 415: You forgot a '=back' before '=head1' perl v5.10.1 2009-04-21 action(3pm)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy