Sponsored Content
Full Discussion: using awk != parameter
Top Forums Shell Programming and Scripting using awk != parameter Post 302189819 by karthikn7974 on Monday 28th of April 2008 03:15:45 AM
Old 04-28-2008
hey thanks era
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

PASS parameter to AWK

Hi, Can i pass a parameter(not a file name) as a parameter to a awk program? eg; $awk -f test 1 2 3 here test is the filename...and 1,2,3 are the i/p parameters? thank you:-) (2 Replies)
Discussion started by: unisam
2 Replies

2. Shell Programming and Scripting

awk/input parameter

Hi, My script takes in one input parameter($1-email id) on the command line... The script contains something like this... awk '$1 == 400' abc.log >def.log mail -s subject $1 <def.log abc.log looks something like this... 300 222 330 123 445 400 098 890 727 663 How do i make the... (3 Replies)
Discussion started by: wannalearn
3 Replies

3. Shell Programming and Scripting

awk parameter

How to pass a parameter in system function e.g system(script parameter) i want to run a shell script along with a parameter (5 Replies)
Discussion started by: alokmits
5 Replies

4. Shell Programming and Scripting

Parameter to AWK

Hi, I need help with AWK. Here is the issue that i'm facing. I have a variable in KSH script set as below. user_text="first second third fourth" My Requirement is to print 'first', 'second', 'third' or 'fourth' based on setting a variable Example 1 user_text="first second third... (17 Replies)
Discussion started by: sacguy08
17 Replies

5. Shell Programming and Scripting

awk pass $LOGDIR parameter

hi guys i need your help , i wrote one script which is as below #!/bin/ksh ########################################################### LOGDIR=/export/home/xyz/logs EMAILFile=$LOGDIR/xxs_email.log BOX=$(uname -a | awk '{print $2}') awk '{if ($4 >= 30) {print $1 " " $3 " HAS LAG of "... (1 Reply)
Discussion started by: tapia
1 Replies

6. Shell Programming and Scripting

Passing a parameter to AWK

Hi All, I am trying to pass a parameter to AWK on my KSH shell prompt as below. var1=2 echo $var1 awk -v var2=${var1} '{print var2}' testfile.txt I am passing the input file (testfile) to awk to get some o/p. It is having 10 records. When I run AWK, it is throwing the following errors... (1 Reply)
Discussion started by: Raamc
1 Replies

7. Shell Programming and Scripting

awk: replace with script parameter

Hi var=0001 I want to replace 2nd field of file with variable var in file sample.txt Please suggest with awk. dont want to use awk -v option. pseudo code : something like this. var=0001 awk '{ 12193 /var } {print $0 }' sample.txt (2 Replies)
Discussion started by: theshashi
2 Replies

8. Shell Programming and Scripting

Parameter not accepting in awk

In below script parameterwhich i am passing to awk function is not working.Not sure why its not accepting parameter.Please tell me how to pass parameter to the awk function.Please check the below script. #!/bin/ksh dummy_file=/etlapps/dev/data/sub_servicer_data/ScriptLogs/emp.txt fields=5... (2 Replies)
Discussion started by: katakamvivek
2 Replies

9. Shell Programming and Scripting

Passing parameter to awk command

Hi, I have a situation where I need to create a SQL statement using Unix script for each value in first field (ID). The file looks like this. Id,TARGET_FIELD_NAME,SOURCE_FIELD_NAME 1,Test_Rate,Field1 1,Test_Factor,Field2 1,Test_Size,Field3 2,Test_Rate,Field4 2,Test_Factor,Field5... (3 Replies)
Discussion started by: kiranredz
3 Replies

10. Shell Programming and Scripting

Does awk have parameter substitution?

Can I specify a default value to a variable in AWK like BASH in one statement using parameter substitution? BASH example: argument=${$1-"default if empty"} (BASH) I know I can do: argument=$1; sub ( "^$", "default if empty", argument) (AWK) Mike (13 Replies)
Discussion started by: Michael Stora
13 Replies
langinfo.h(3HEAD)						      Headers							 langinfo.h(3HEAD)

NAME
langinfo.h, langinfo - language information constants SYNOPSIS
#include <langinfo.h> DESCRIPTION
The <langinfo.h> header contains the constants used to identify items of langinfo data (see nl_langinfo(3C)). The type of the constant, nl_item, is defined as described in <nl_types.h>. The following constants are defined. The entries under Category indicate in which setlocale(3C) category each item is defined. | | Constant | Category | Meaning ----------------+----------------+---------------------------------------- CODESET |LC_CTYPE |codeset name ----------------+----------------+---------------------------------------- D_T_FMT |LC_TIME |string for formatting date and time ----------------+----------------+---------------------------------------- D_FMT |LC_TIME |date format string ----------------+----------------+---------------------------------------- T_FMT |LC_TIME |time format string ----------------+----------------+---------------------------------------- T_FMT_AMPM |LC_TIME |a.m. or p.m. time format string ----------------+----------------+---------------------------------------- AM_STR |LC_TIME |ante-meridiem affix ----------------+----------------+---------------------------------------- PM_STR |LC_TIME |post-meridiem affix ----------------+----------------+---------------------------------------- DAY_1 |LC_TIME |name of the first day of the week (for | |example, Sunday) ----------------+----------------+---------------------------------------- DAY_2 |LC_TIME |name of the second day of the week (for | |example, Monday) ----------------+----------------+---------------------------------------- DAY_3 |LC_TIME |name of the third day of the week (for | |example, Tuesday) ----------------+----------------+---------------------------------------- DAY_4 |LC_TIME |name of the fourth day of the week (for | |example, Wednesday) ----------------+----------------+---------------------------------------- DAY_5 |LC_TIME |name of the fifth day of the week (for | |example, Thursday) ----------------+----------------+---------------------------------------- DAY_6 |LC_TIME |name of the sixth day of the week (for | |example, Friday) ----------------+----------------+---------------------------------------- DAY_7 |LC_TIME |name of the seventh day of the week | |(for example, Saturday) ----------------+----------------+---------------------------------------- ABDAY_1 |LC_TIME |abbreviated name of the first day of | |the week ----------------+----------------+---------------------------------------- ABDAY_2 |LC_TIME |abbreviated name of the second day of | |the week ----------------+----------------+---------------------------------------- ABDAY_3 |LC_TIME |abbreviated name of the third day of | |the week ----------------+----------------+---------------------------------------- ABDAY_4 |LC_TIME |abbreviated name of the fourth day of | |the week ----------------+----------------+---------------------------------------- ABDAY_5 |LC_TIME |abbreviated name of the fifth day of | |the week ----------------+----------------+---------------------------------------- ABDAY_6 |LC_TIME |abbreviated name of the seventh day of | |the week ----------------+----------------+---------------------------------------- ABDAY_7 |LC_TIME |abbreviated name of the seventh day of | |the week ----------------+----------------+---------------------------------------- MON_1 |LC_TIME |name of the first month of the year ----------------+----------------+---------------------------------------- MON_2 |LC_TIME |name of the second month ----------------+----------------+---------------------------------------- MON_3 |LC_TIME |name of the third month ----------------+----------------+---------------------------------------- MON_4 |LC_TIME |name of the fourth month ----------------+----------------+---------------------------------------- MON_5 |LC_TIME |name of the fifth month ----------------+----------------+---------------------------------------- MON_6 |LC_TIME |name of the sixth month ----------------+----------------+---------------------------------------- MON_7 |LC_TIME |name of the seventh month ----------------+----------------+---------------------------------------- MON_8 |LC_TIME |name of the eighth month ----------------+----------------+---------------------------------------- MON_9 |LC_TIME |name of the ninth month ----------------+----------------+---------------------------------------- MON_10 |LC_TIME |name of the tenth month ----------------+----------------+---------------------------------------- MON_11 |LC_TIME |name of the eleventh month ----------------+----------------+---------------------------------------- MON_12 |LC_TIME |name of the twelfth month ----------------+----------------+---------------------------------------- ABMON_1 |LC_TIME |abbreviated name of the first month ----------------+----------------+---------------------------------------- ABMON_2 |LC_TIME |abbreviated name of the second month ----------------+----------------+---------------------------------------- ABMON_3 |LC_TIME |abbreviated name of the third month ----------------+----------------+---------------------------------------- ABMON_4 |LC_TIME |abbreviated name of the fourth month ----------------+----------------+---------------------------------------- ABMON_5 |LC_TIME |abbreviated name of the fifth month ----------------+----------------+---------------------------------------- ABMON_6 |LC_TIME |abbreviated name of the sixth month ----------------+----------------+---------------------------------------- ABMON_7 |LC_TIME |abbreviated name of the seventh month ----------------+----------------+---------------------------------------- ABMON_8 |LC_TIME |abbreviated name of the eighth month ----------------+----------------+---------------------------------------- ABMON_9 |LC_TIME |abbreviated name of the ninth month ----------------+----------------+---------------------------------------- ABMON_10 |LC_TIME |abbreviated name of the tenth month ----------------+----------------+---------------------------------------- ABMON_11 |LC_TIME |abbreviated name of the eleventh month ----------------+----------------+---------------------------------------- ABMON_12 | LC_TIME |abbreviated name of the twelfth month ----------------+----------------+---------------------------------------- ERA |LC_TIME |era description segments ----------------+----------------+---------------------------------------- ERA_D_FMT |LC_TIME |era date format string ----------------+----------------+---------------------------------------- ERA_D_T_FMT |LC_TIME |era date and time format string ----------------+----------------+---------------------------------------- ERA_T_FMT |LC_TIME |era time format string ----------------+----------------+---------------------------------------- ALT_DIGITS |LC_TIME |alternative symbols for digits ----------------+----------------+---------------------------------------- RADIXCHAR |LC_NUMERIC |radix character ----------------+----------------+---------------------------------------- THOUSEP |LC_NUMERIC |separator for thousands ----------------+----------------+---------------------------------------- YESEXPR |LC_MESSAGES |affirmative response expression ----------------+----------------+---------------------------------------- NOEXPR |LC_MESSAGES |negative response expression ----------------+----------------+---------------------------------------- YESSTR |LC_MESSAGES |affirmative response for yes/no queries ----------------+----------------+---------------------------------------- NOSTR |LC_MESSAGES |negative response ro yes/no queries ----------------+----------------+---------------------------------------- CRNCYSTR |LC_MONETARY |local currency symbol, preceded by '-' | |if the symbol sould appear before the | |value, '+' if the symbol should appear | |after the value, or '.' if the symbol | |should replace the radix character If the locale's values for p_cs_precedes and n_cs_precedes do not match, the value of nl_langinfo(CRNCYSTR) is unspecified. The <langinfo.h> header declares the following as a function: char *nl_langinfo(nl_item); Inclusion of <langinfo.h> header may also make visible all symbols from <nl_types.h>. USAGE
Wherever possible, users are advised to use functions compatible with those in the ISO C standard to access items of langinfo data. In par- ticular, the strftime(3C) function should be used to access date and time information defined in category LC_TIME. The localeconv(3C) func- tion should be used to access information corresponding to RADIXCHAR, THOUSEP, and CRNCYSTR. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
mkmsgs(1), localeconv(3C), nl_langinfo(3C), nl_types.h(3HEAD), setlocale(3C), strftime(3C), attributes(5), standards(5) SunOS 5.11 30 Aug 2002 langinfo.h(3HEAD)
All times are GMT -4. The time now is 11:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy