01-10-2008
Awk also supports user defined functions, I should read some awk manuals.
Regards
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i need help with an awk question. i am looking to have an external variable be defined outside of awk but used in awk. so if we have fields $1, $2, $3 so on and so forth, i would like to be able to dictate what field is being printed by something like $. so if i had a counter called test, make it 3... (8 Replies)
Discussion started by: pupp
8 Replies
2. Shell Programming and Scripting
hi guys, how r u???
please I need you, help me please.
I have a shell, in this shell i have this function and another code lines, this function is getting date one day back. the function is in the same shell (FILE 1)
Now I need put this function in another file (FILE 2) and calling... (4 Replies)
Discussion started by: acevallo
4 Replies
3. Shell Programming and Scripting
Hey guys,
I'm not the best AIX scripter about but I can flounder my way thru them to create what I need.
Anyhow, I have various scripts that perform various actions and processes. I was tasked to come up with a single form of logging that all the scripts could implement so that the output... (2 Replies)
Discussion started by: isawme
2 Replies
4. Shell Programming and Scripting
Hi,
Anybody know any way to Call with Shell Script an external function wrote in .C or .So (Shared Object) on AIX enviroment and returning parameters of .C or .SO to Shell Script?
Tks!! (6 Replies)
Discussion started by: rdgsantos
6 Replies
5. UNIX for Dummies Questions & Answers
Is it possible to call a function from another script?
Thanks (6 Replies)
Discussion started by: chrisjones
6 Replies
6. Shell Programming and Scripting
I'm trying to get the universities result data into different file, where the $9 contains unversity field and field7,4 & 5 contains the keys to sort the students by marks. How to use uni variable to match against $9 inside awk?
c=0
for uni in `cat /tmp/global_rank| awk -F ',' '{print... (1 Reply)
Discussion started by: InduInduIndu
1 Replies
7. Shell Programming and Scripting
my $sysdate = strftime('%Y-%m-%d', localtime );
biDeriveByDate('Table_Str',$sysdate,\@lIndx,\@lResVals)
In a perl script, when I'm trying to pass $sysdate to some external function it's not working since $sysdate is passed as a string mentioned above but my function is expecting a date value... (1 Reply)
Discussion started by: Devesh5683
1 Replies
8. Shell Programming and Scripting
Hi,
I am trying to write a bash script in which I need to pass a external variable to the awk program. I tired using -v but it not accepting the value.
Here is my sample code.
#!/usr/bin/bash
######################################################################################
####... (5 Replies)
Discussion started by: jpkumar10
5 Replies
9. Shell Programming and Scripting
I wrote a very simple script to understand how to call user-defined functions from within awk after reading this post.
function my_func_local {
echo "In func $1"
}
export -f my_func_local
echo $1 | awk -F"/" '{for (k=1;k<=NF;k++) {
if ($k == "a" ) {
system("my_local_func $k")
}
else{... (19 Replies)
Discussion started by: sreyan32
19 Replies
10. Shell Programming and Scripting
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
LEARN ABOUT SUSE
tzselect
TZSELECT(8) Linux System Administration TZSELECT(8)
NAME
tzselect - select a timezone
SYNOPSIS
tzselect
DESCRIPTION
The tzselect program asks the user for information about the current location, and outputs the resulting timezone description to standard
output. The output is suitable as a value for the TZ environment variable.
All interaction with the user is done via standard input and standard error.
EXIT STATUS
The exit status is zero if a timezone was successfully obtained from the user, nonzero otherwise.
ENVIRONMENT
AWK Name of a Posix-compliant awk program (default: awk).
TZDIR Name of the directory containing timezone data files (default: /usr/share/zoneinfo).
FILES
TZDIR/iso3166.tab
Table of ISO 3166 2-letter country codes and country names.
TZDIR/zone.tab
Table of country codes, latitude and longitude, TZ values, and descriptive comments.
TZDIR/TZ
Time zone data file for timezone TZ.
SEE ALSO
tzfile(5), zdump(8), zic(8)
COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
2007-05-18 TZSELECT(8)