Sponsored Content
Full Discussion: help need on nawk script
Top Forums Shell Programming and Scripting help need on nawk script Post 302185014 by era on Monday 14th of April 2008 03:36:02 AM
Old 04-14-2008
Code:
tr ' ' '
' <file

That is, convert space (in single quotes) to newline (in single quotes).

Edit: didn't notice you were hijacking somebody else's thread. Please don't do that.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

NAWK Script not working fine

Hello to all can any one help me out with a nawk script. Actually i am having a shell script which uses nawk pattern searching and it is not parsing the file properly. I have been debugging it since long time, but nt able 2 find the root cause.. If any one can help me out with this one .. (3 Replies)
Discussion started by: dheeraj19584
3 Replies

2. UNIX for Dummies Questions & Answers

Loop in Nawk Script

I have a script which performs a getline (customer enters data) and a list is returned which has the data that was entered return to them. Then it ends. How can I get this script to return to the begin and ask the question again. Ths script needs to stop after the list is returned and then hit... (2 Replies)
Discussion started by: Morph797
2 Replies

3. Shell Programming and Scripting

Error running nawk script

Hi, I was trying to use nawk script given in this link https://www.unix.com/aix/19979-df-output-not-aligned.html but when i do this im getting this error $ df -k|formatDF.nawk -ksh: formatDF.nawk: not found Can anyone help me on this... (6 Replies)
Discussion started by: niteesh_!7
6 Replies

4. Shell Programming and Scripting

Var in nawk script parse incorrectly

I'm writing a Texas Hold'em script in bash v3.00.16(1) to learn more about awk/nawk scripts and regex expressions by trying to randomize a list of names using awk's rand function. The problem is that the elements in the var convert to a single element in the nawk script. I've tried several things,... (4 Replies)
Discussion started by: HexKnot
4 Replies

5. Shell Programming and Scripting

Nawk Script not working

Any idea why this isn't working? YESTERF=`TZ=aaa24 date +%b"-"%d | sed 's/-0/--/'` filelist2=$(find /export/home/gen/cks/traces \( -name \*YESTERF\* -name \*DNA\* \) -print | tr '\n' ' ') print "Date/Time,Location,Shelf,IP,Reason,Log Filename" >> $OUTPUT nawk -F':' ' $2 ~... (2 Replies)
Discussion started by: ther2000
2 Replies

6. Shell Programming and Scripting

Pass parameter to nawk from shell script

I need to parse log files using nawk, but I'm not able to pass script input argument (date) to nawk, for example: ------------ #!/bin/ksh read date nawk -F, '{if($1==date) print $4" "$5}' ------------- Is there a way to pass an argument to nawk from shell script. Many thanks... (8 Replies)
Discussion started by: samer.odeh
8 Replies

7. Shell Programming and Scripting

nawk script to manipulate txt file

Hi experts, I am not familiarised using nawk/awk to manipulate txt file. So I need ur help here. thanks. txt1 - qc_m.log TQC101 TQC102 TQC103 TQC104 txt2 - resultEqpt.log TQC102,,LOGOFF TQC103,,LOGOFF TQC104,2012-10-03 07:42:57,LOGON so TQC101 is not found in txt 2. ... (15 Replies)
Discussion started by: ment0smintz
15 Replies

8. Shell Programming and Scripting

How to pass nawk variable to shell within the same script?

Hi All, I tried googling but so far no luck, can someone tell me how pass the variable value used inside the nawk command to shell. In the below script i get the value of $c (without color: Total Executed: " c ") but the printf which is outside the nawk command doesn't print the value or it... (4 Replies)
Discussion started by: Optimus81
4 Replies

9. 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

10. Shell Programming and Scripting

Use of -r, grep, nawk in script

Hello Friends, I am new to unix shell, need to understand the meaning of few cmds in below script, #!/usr/bin/ksh FTP_FILE_NAME="$1" if then grep "TRLR@@@@@@" $FTP_FILE_NAME | nawk -F"" '{print $2}' else echo "0" fi what is the use of -r, grep, nawk & -F in above script. Why... (2 Replies)
Discussion started by: DK2014
2 Replies
Locale::Codes::LangVar(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangVar(3pm)

NAME
Locale::Codes::LangVar - standard codes for language variation identification SYNOPSIS
use Locale::Codes::LangVar; $lvar = code2langvar('acm'); # $lvar gets 'Mesopotamian Arabic' $code = langvar2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langvar_codes(); @names = all_langvar_names(); DESCRIPTION
The "Locale::Codes::LangVar" module provides access to standard codes used for identifying language variations, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language variations. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lvar = code2langvar('en','alpha-2'); $lvar = code2langvar('en',LOCALE_CODE_ALPHA_2); The codesets currently supported are: alpha This is the set of alphanumeric codes from the IANA language registry, such as 'arevela' for Eastern Armenian. This code set is identified with the symbol "LOCALE_LANGVAR_ALPHA". This is the default code set. ROUTINES
code2langvar ( CODE [,CODESET] ) langvar2code ( NAME [,CODESET] ) langvar_code2code ( CODE ,CODESET ,CODESET2 ) all_langvar_codes ( [CODESET] ) all_langvar_names ( [CODESET] ) Locale::Codes::LangVar::rename_langvar ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangVar::add_langvar ( CODE ,NAME [,CODESET] ) Locale::Codes::LangVar::delete_langvar ( CODE [,CODESET] ) Locale::Codes::LangVar::add_langvar_alias ( NAME ,NEW_NAME ) Locale::Codes::LangVar::delete_langvar_alias ( NAME ) Locale::Codes::LangVar::rename_langvar_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangVar::add_langvar_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangVar::delete_langvar_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2012 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2012-10-11 Locale::Codes::LangVar(3pm)
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy