Hi Folks,
I have 2 perl scripts and I need to execute 2nd perl script from the 1st perl script in WINDOWS.
In the 1st perl script that I had, I am calling the 2nd script
main.pl
===========
print "This is my main script\n";
`perl C:\\Users\\sripathg\\Desktop\\scripts\\hi.pl`;
hi.pl ( this script I am calling from the firstperlscript.pl)
====
#!perl -w
print "hii Gir
I am currently in Afghanistan and do not have access to some of the resources I normally do back in the US. Just accessed this site and it looks promising! Hopefully you will not find my question too much of a waste of your time.
I write mostly Korn Shell and PERL on Solaris systems for the Army.
Hi...
Iam running the following Perl Script for telnet and running the commands.The script is exited without any errors.But the telnet commands are not executed,Please help me to resolve my problem.
My telnet session
#telnet 9.121.61.2 2013
Trying 9.121.61.2...
Connected to 9.121.61.2.
Escape character is '^]'.
Perl Script
#!/usr/bin/perl -w
use Net::Telnet();
$telnet = new Net::Teln
I installed Zenwalk Linux today.
I want the output of this file to be in a column, not next to each ohter. I tired putting a a newline escape character in a few places, but it breaks the script. It is easy in awk, just ls -ltr | awk '{print $8 }'
casper@casper-laptop:~$ pwd
/home/casper
casper@casper-laptop:~$ ls -ltr > /tmp/outfile
casper@casper-laptop:~$ cat -n /tmp/moreawkreplace
I need to execute a command with escaped argument(s) using sh -c.
I want to execute awk command without quotes.
Code:
who am i | awk {'print $2'}
above code should be something like:
Code:
who am i | awk {print $2}
Why such weird requirement?
Im assigning command to a variable, hence i need to escape the quotes.
e.g:
Code:
x='who am i | awk {\'print $2\'}'
I want to avoid these escape character such that the code looks neat.
Thanks
Hello experts attention need
I am looking to run a unix shell command in perl script but its getting failing due to pipe "|" and semi colon ";"
can any one help me to run folloing command in perl script
p4 -o $valu | sed -e "s/<xxxx>/zzz/g/\;/s/<ggg>/ffff/g" | p4 change -i
above command should run in one shot
THANKS IN ADVANCE
Currently I use:
sed -i -e "5a\\
${text}" $filename
to append something to a certain line, where the variable text
contains a string such as "\epsilon".
When using
echo -E $text
the string is displayed just fine, but when I expand it in the string
I pass to sed, all escape characters get expanded and the result is
not what I would want.
How can I get sed to use the raw contents of that str