473,750 Members | 2,520 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to use value of variable written in shell script in perl script

3 New Member
suppose i have a variable in shell script like a="prashant"
and i want to assign this variable into another variable like b=$a,which is in perl script.after run perl script the value of b should be "prashant".


thanks in advance
Dec 1 '08 #1
4 2603
kat248637
3 New Member
how to access the value of variable of sh script into perl script





thanks in advance
Dec 2 '08 #2
eWish
971 Recognized Expert Contributor
kat248637,

I have merged your two threads since they are concerning the same or very similar issue.

I am sorry that I don't have experience with shell scripting and can not offer any suggestions. Hopefully, one of our Experts will be able to assist you.

--Kevin
Moderator
Dec 2 '08 #3
Ganon11
3,652 Recognized Expert Specialist
It looks like you want either the %ENV variable, or the Env package. Try:

perldoc Env
Using a Module
Dec 2 '08 #4
KevinADC
4,059 Recognized Expert Specialist
ask on The UNIX and Linux Forums - the Top UNIX & Linux Q&A on the Web in the shell scripting forum
Dec 3 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2139
by: julio Morales | last post by:
Hi! When a user is in a MSAccess form, with the values of a registry, and click on 'send this', I need to send the id. value of such registry to a perl script with visual basic. I can exec a perl script with shell(), but I dont really know how to obtain the id value or any value with visual basic. Is there some object structure representing the bd or the table? Is there some kind of this_table.this_registry.id value on visual basic??
2
5668
by: Mohsin | last post by:
Hi all, I have a perl program which makes a user exit to the O/S (unix, solaris) to issue a O/S command. I know that the shell it invokes is NOT a korn shell, because I captured the shell info into a file with a 'ps' command. My question is "How to explicitly specify a Korn shell to be used by perl?" Eg of my perl code: ## Begin code snippet..
1
4994
by: speedster | last post by:
Hi. I need some help converting some php to perl. $meminfo = shell_exec( "free -o" ); I need to execute "free-o" in shell and get the results. It grabs memory information about a linux webserver. If it is also possible to run a regular expression on this data that would also be great. It then outputs it in a nice format.
2
6094
by: prakashpb | last post by:
Hello All, I am new to perl. I have to write some code in perl on windows. I have to invoke/run a shell file sample.sh from within perl file. When the perl while is executing, it should run to set some env variables. Another requirement is that: I want to invoke cygwin shell from perl and then run some commands like cd, ls on the cygwin window. All this to be done by invoking through the running perl script.
1
3306
by: satish2112 | last post by:
Hi, I have a text-area which contains values from mysql database and 2 buttons, Edit and Update. When I click on the Edit button, I can edit the text-area (initially non-editable). After this, if I click on the Update button, the values in the text-area must be updated in the mysql database. I am storing the values of the text-area in a variable. I am using javascript to pass the variable.
1
2045
by: looza | last post by:
Hi All, I have a bunch of shell script files that use a common shell script file that contains certain global variables that are declared and initialized or derived by some arithmatic. I have to now convert one of the shell script file to a perl file so I can use the in-built functions. Is the a way I can import the file with the globals and use them in my perl script? Thanks!
7
6236
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke this shell script using the Subprocess module. Here is my code: def resultFromRunning_(command):
4
34309
by: devi thapa | last post by:
Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Regards, Devi
4
5215
by: babp | last post by:
HI , Is there any way to return a value of variable from shell to perl script. Code: === Perl file my $diff1=system("sh diff.sh"); my $diff2=system("sh diff1.sh"); I need exit status of below commands
0
9000
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9396
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9339
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2804
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2225
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.