10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. 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
6. UNIX for Dummies Questions & Answers
Is it possible to call a function from another script?
Thanks (6 Replies)
Discussion started by: chrisjones
6 Replies
7. 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
8. 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
9. 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
10. 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