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 > 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
Getting another process' environment DreamWarrior High Level Programming 3 04-02-2008 01:31 PM
environment variable sharanbr Shell Programming and Scripting 8 06-12-2007 08:43 AM
Environment help please komputersman SUN Solaris 4 06-11-2007 06:36 PM
Reset environment - ".. /etc/.environment dev_env" zzwu3591 UNIX for Advanced & Expert Users 7 01-12-2007 09:27 AM
help..Environment variables... sekar sundaram UNIX for Dummies Questions & Answers 3 08-30-2005 03:35 AM

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

Join Date: Apr 2009
Posts: 4
Set environment

Hi,

I can run shell script from the command line using

$ . set

If the run the script inside perl script using

$var = system("set");
print $var;

This prints 0.



This command sets up the environment from command line. But when used inside the shell script or perl script it doesnot work

Please help how this can be called with in shell script
  #2 (permalink)  
Old 04-21-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361

If set is not in a directory in your PATH, use the full path to the file.
  #3 (permalink)  
Old 04-22-2009
sandy1028 sandy1028 is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 4
set is in the same directory.
But the shell script executed in the command line is
Code:
$ . set
But same command does not execute
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 03:26 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