The UNIX and Linux Forums  

Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Accessing variables of one shell script in another shell script rsendhilmani Shell Programming and Scripting 2 03-17-2009 01:17 AM
Shell script to read file into variable aspect_p Shell Programming and Scripting 7 03-21-2008 12:12 PM
Shell script for accessing a file in the network drive and invoking oracle sql loader sayydevara Shell Programming and Scripting 0 03-20-2007 03:54 PM
Read variable from file in a C shell script haouesse Shell Programming and Scripting 2 11-07-2006 09:34 AM
Accessing var from .profile into shell script videsh77 Shell Programming and Scripting 7 05-28-2005 12:21 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-04-2007
HIMANI's Avatar
HIMANI HIMANI is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 20
accessing shell script variable in file

Hi,
I have a shell script in which there is a file
conn_$temp
where $temp has the pid of the shell script.

in this shell script i have an embedded awk script that must read the file

while ((getline < "conn_$temp") > 0)

However due to the "$temp" in the file name, the awk script is unable to open the file.
How can i fix this problem?
basically i need to append the pid to the file name so that for each session the file names will be different.
Thanks for your help in advance.


Himani
 

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 03:54 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