So I have a shell script that outputs some variables, call them $a and $b. I know in shell scripting if I wanted to use the variables in another shell script I'd do
How can I do something similar with perl?
Hi,
I have a 1-line file which looks like " First second third 4 five". I need to extract the number (here 4) in that line and put it in a variable. I will use the variable later to make few tests in my C shell script.
Can somebody help me? (2 Replies)
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... (6 Replies)
the script i am trying to write will allow my server to give itself an ip address.
So far i am up to the following but i'm stuck.
tracert -m 1 > traceroute.txt
1 routername (ipaddr) 2.094 ms 1.789 ms 1.243 ms
i want to get ipaddr as a variable and use it to write the ifcfg-eth... (7 Replies)
Solaris 10
Korn shell ksh,
Hi there,
I have figured out to get yesterday's date which is using the below command:
TZ=GMT+24; date +%d-%b-%Y to get the format of 30-Sep-2008 and
TZ=GMT+24; date +%Y%m%d to get the format of 20080930.
I need this two format. In my perl script below I need... (4 Replies)
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
i.e 0 and 1 respectively.
Since in both the cases diff is working so system... (3 Replies)
Hi,
I had written shell script to access config file as input parameter.
Contents of ConfFile.cfg are
USER=ora
PASSWORD=ora
Shell script is DBConnect.ksh
#!/bin/sh
usage="`basename $0` <configuration_file_name>"
DB_Connect()
{
sqlplus -s ora/ora << EOF
CREATE TABLE TBL1... (10 Replies)
hi,
I have a local.conf file which has the first line
TOPDIR = "/home/mvdev/workspace/boxer". I want to replace the value to
"/home/common/workspace/mirror". I tried the following perl command that is
perl -p -i -e 's/Path/path1/g' myfile.txt then
sed... (7 Replies)
I have a file abc.ini and declared many variables in that file, one of the variable(DBname) value I am trying to read in my perl script but getting error.
File abc.ini content
# database name
DBname =UATBOX
my $ex_stat;
my $cmd_output;
$ex_stat = "\Qawk '/^DBname/{print... (2 Replies)
I want to make a config file which contain all the paths.
i want to read the config file line by line and pass as an argument on my below function.
Replace all the path with reading config path line by line and pass in respective functions.
how can i achieve that?
Kindly guide.
... (6 Replies)