Sponsored Content
Full Discussion: nawk issue
Top Forums Shell Programming and Scripting nawk issue Post 302604927 by binlib on Tuesday 6th of March 2012 10:05:38 AM
Old 03-06-2012
Removed, Alister explained much better.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

nawk

Hi, I had this syntax and no matter what I do, I can't get it run. err message: run6: syntax error at line 121 : `(' unexpected I went to line 121 and it's comment out! All the variables passed to nawk are valid. There are two places I suspect have the problem: 1.... (3 Replies)
Discussion started by: whatisthis
3 Replies

2. UNIX for Advanced & Expert Users

nawk use

I found a command who prints x lines before and after a line who contain a searched string in a text file. The command is : ------------------- nawk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r;print;c=a}b{r=$0}' b=2 a=4 s="string" file1 ...where "b" and "a" are the number of lines to print... (2 Replies)
Discussion started by: ctap
2 Replies

3. Shell Programming and Scripting

how to access values of awk/nawk variables outside the awk/nawk block?

i'm new to shell scripting and have a problem please help me in the script i have a nawk block which has a variable count nawk{ . . . count=count+1 print count } now i want to access the value of the count variable outside the awk block,like.. s=`expr count / m` (m is... (5 Replies)
Discussion started by: saniya
5 Replies

4. Shell Programming and Scripting

grep / nawk issue

I have a report which contains the following: Count Value % 47 69.12 18 26.47 3 4.41 I want to grep the total on the bottom brackets and store in a variable. However this may have a different figure everyday. To read the i do: ... (1 Reply)
Discussion started by: Pablo_beezo
1 Replies

5. Shell Programming and Scripting

Nesting - two nawk into one nawk

hi people; this is my two awk code: nawk '/cell+-/{r=(NF==8) ? $4FS$5FS$6 : NF==7 ? $4FS$5 : $4 ;c=split(r,rr);for (i=1;i<=c;i++){if(rr != "111111"){printf($3" %d ""\n",(i+3))}}printf("")}' /home/gc_sw/str.txt > /home/gc_sw/predwn.txt nawk -F'*' '{gsub(/ *$/,"")}$0=$1$($NF-2)'... (2 Replies)
Discussion started by: gc_sw
2 Replies

6. UNIX for Dummies Questions & Answers

Nawk help!!!

Hi, Please help me I want to filter all messages having a value less than a particular value..Please advice how to use <= in the below red marked script.. Getting the error as no such file or directory for the marked line no. Thanks in advance... Script is as under : read message gawk... (5 Replies)
Discussion started by: vanand420
5 Replies

7. Shell Programming and Scripting

issue with toupper in nawk

Hi All, I am seeing an issue while using toupper in nawk. Below is the code that I am using.Toupper method is not working as expected in this case.nawk 'NR==FNR{a=$4" "$5}NR>FNR{print NF?$0:a"\n";if(/^cn:/) x=toupper($0)}' FS="" id_list.txt attributes.txt > out In the above script, id_list... (9 Replies)
Discussion started by: Samingla
9 Replies

8. Shell Programming and Scripting

issue with nawk while using variable assignment

#ifconfig -a | nawk '/1.1.1.1/{print}' inet 1.1.1.1 netmask xxxxxxxxx broadcast 0.0.0.0 If i assign the ip to a variable and search for the variable nothing gets printed!! # ifconfig -a | nawk -v ip=1.1.1.1 '/ip/{print}' I am not able to understand why this is happening! (6 Replies)
Discussion started by: chidori
6 Replies

9. Shell Programming and Scripting

Substitution Issue with nawk

Hi, I'm trying to reformat some badly formatted XML that I've extracted from Oracle clob columns using the following nawk command: nawk '{gsub(/&lt;/,/>\n/); print}' test.raw > test.xml the substitution executes fine, but instead of subbing &lt; with > followed by newline, it subs the &lt; with a... (3 Replies)
Discussion started by: sffuji
3 Replies

10. Shell Programming and Scripting

Nawk Problem - nawk out of space in tostring on

Hi.. i am running nawk scripts on solaris system to get records of file1 not in file2 and find duplicate records in a while with the following scripts -compare nawk 'NR==FNR{a++;next;} !a {print"line"FNR $0}' file1 file2duplicate - nawk '{a++}END{for(i in a){if(a-1)print i,a}}' file1in the middle... (12 Replies)
Discussion started by: Abhiraj Singh
12 Replies
Find(3) 						User Contributed Perl Documentation						   Find(3)

NAME
Module::Find - Find and use installed modules in a (sub)category SYNOPSIS
use Module::Find; # use all modules in the Plugins/ directory @found = usesub Mysoft::Plugins; # use modules in all subdirectories @found = useall Mysoft::Plugins; # find all DBI::... modules @found = findsubmod DBI; # find anything in the CGI/ directory @found = findallmod CGI; # set your own search dirs (uses @INC otherwise) setmoduledirs(@INC, @plugindirs, $appdir); # not exported by default use Module::Find qw(ignoresymlinks followsymlinks); # ignore symlinks ignoresymlinks(); # follow symlinks (default) followsymlinks(); DESCRIPTION
Module::Find lets you find and use modules in categories. This can be very useful for auto-detecting driver or plugin modules. You can differentiate between looking in the category itself or in all subcategories. If you want Module::Find to search in a certain directory on your harddisk (such as the plugins directory of your software installation), make sure you modify @INC before you call the Module::Find functions. FUNCTIONS
"setmoduledirs(@directories)" Sets the directories to be searched for modules. If not set, Module::Find will use @INC. If you use this function, @INC will not be included automatically, so add it if you want it. Set to undef to revert to default behaviour. "@found = findsubmod Module::Category" Returns modules found in the Module/Category subdirectories of your perl installation. E.g. "findsubmod CGI" will return "CGI::Session", but not "CGI::Session::File" . "@found = findallmod Module::Category" Returns modules found in the Module/Category subdirectories of your perl installation. E.g. "findallmod CGI" will return "CGI::Session" and also "CGI::Session::File" . "@found = usesub Module::Category" Uses and returns modules found in the Module/Category subdirectories of your perl installation. E.g. "usesub CGI" will return "CGI::Session", but not "CGI::Session::File" . "@found = useall Module::Category" Uses and returns modules found in the Module/Category subdirectories of your perl installation. E.g. "useall CGI" will return "CGI::Session" and also "CGI::Session::File" . "ignoresymlinks()" Do not follow symlinks. This function is not exported by default. "followsymlinks()" Follow symlinks (default behaviour). This function is not exported by default. HISTORY
0.01, 2004-04-22 Original version; created by h2xs 1.22 0.02, 2004-05-25 Added test modules that were left out in the first version. Thanks to Stuart Johnston for alerting me to this. 0.03, 2004-06-18 Fixed a bug (non-localized $_) by declaring a loop variable in use functions. Thanks to Stuart Johnston for alerting me to this and providing a fix. Fixed non-platform compatibility by using File::Spec. Thanks to brian d foy. Added setmoduledirs and updated tests. Idea shamelessly stolen from ...errm... inspired by brian d foy. 0.04, 2005-05-20 Added POD tests. 0.05, 2005-11-30 Fixed issue with bugfix in PathTools-3.14. 0.06, 2008-01-26 Module::Find now won't report duplicate modules several times anymore (thanks to Uwe Voelker for the report and the patch) 0.07, 2009-09-08 Fixed RT#38302: Module::Find now follows symlinks by default (can be disabled). 0.08, 2009-09-08 Fixed RT#49511: Removed Mac OS X extended attributes from distribution 0.09, 2010-02-26 Fixed RT#38302: Fixed META.yml generation (thanks very much to cpanservice for the help). 0.10, 2010-02-26 Fixed RT#55010: Removed Unicode BOM from Find.pm. 0.11, 2012-05-22 Fixed RT#74251: defined(@array) is deprecated under Perl 5.15.7. DEVELOPMENT NOTES
Please report any bugs using the CPAN RT system. The development repository for this module is hosted on GitHub: <http://github.com/crenz/Module-Find/>. SEE ALSO
perl AUTHOR
Christian Renz, <crenz@web42.com> COPYRIGHT AND LICENSE
Copyright 2004-2012 by Christian Renz <crenz@web42.com>. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2012-05-21 Find(3)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy