The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
calling external values inside awk command tkbharani UNIX for Advanced & Expert Users 13 04-22-2008 03:26 AM
Calling a function ashika UNIX for Dummies Questions & Answers 5 09-12-2006 08:58 PM
calling a C executable from inside a Perl script mark_nsx Shell Programming and Scripting 3 10-07-2005 06:49 AM
Calling other file function maldini Shell Programming and Scripting 3 08-19-2005 03:23 AM
c++ calling main() function norsk hedensk High Level Programming 3 01-22-2003 08:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-14-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Arrow calling function inside awk

Hi All,

My 1.txt contains some functions
fun1()
....
....

fun2()
....
....


I can call these fun from 2.txt inside awk as below
value="`fun1 "argument1"`"
awk 'BEGIN {printf ("%s", "'"$value"'")}'

I need to modify the above code so that without using the variable to store function return value, i can directly call the function inside the awk statement and print then and there.

Is this possible??

Can some one help me with this

Thanks in advance
JS
  #2 (permalink)  
Old 04-14-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652

Code:
awk 'BEGIN {printf ("%s", "'"`fun1 "argument1"`"'")}'


Last edited by era; 04-14-2008 at 01:00 PM.. Reason: Missing close /CODE tag
  #3 (permalink)  
Old 04-14-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Thank you so much era !!!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0