04-19-2009
you can use backticks, system() or open(). please see the docs.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to assign the current user to a variable in my perl script.
My first attempt using Solaris 8 (perl 5) is:
$VAR = system(logname);
However, this assigns 0 to $VAR, and outputs the user to the screen. Does anyone know the command that I need?
Thanks,
seismic_willy (2 Replies)
Discussion started by: seismic_willy
2 Replies
2. Shell Programming and Scripting
Hi friends,
I want to use query string value to another variable but it gives following error when I use it with print out command,
Insecure dependency in open while running with -T switch at C:/Program Files/Apache Group/Apache2/cgi-bin/cdr_findere.pl line 119.
My code as follows,
my... (0 Replies)
Discussion started by: maheshsri
0 Replies
3. UNIX for Dummies Questions & Answers
i have to do an assingment using mailx, where can i find info on mailx?
*yes i read the rules, so i am not asking for the asnwers, just need to learn about mailx more (1 Reply)
Discussion started by: punk_87
1 Replies
4. Shell Programming and Scripting
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)
Discussion started by: bulkbiz
4 Replies
5. Shell Programming and Scripting
I am new to scripting in Perl so I have a dumb question.
I know I can call system commands using
system("date");
But I am not able to:
1. set its output to a variable
2. run in quiet mode(no output to the screen)
The examples i have
#!/usr/bin/perl
print `date +\%y\%m\%d.\%H\%M`;... (5 Replies)
Discussion started by: 4scriptmoni
5 Replies
6. Shell Programming and Scripting
Can we pass perl variable to shell commands. If yes, please give some example. (2 Replies)
Discussion started by: Anjan1
2 Replies
7. Shell Programming and Scripting
I'm trying to replace path which is part of variable inside script file:
FROM:
ABC_HOME=$ABC_ROOT/abc/1.0
TO:
ABC_HOME=$ABC_ROOT/abc/1.5
I'm using this:
perl -pi -e 's\ABC_HOME=$ABC_ROOT/abc/1.0\ABC_HOME=$ABC_ROOT/abc/1.5\g' /apps/scripts/test.sh
This command is not working because... (2 Replies)
Discussion started by: djanu
2 Replies
8. Shell Programming and Scripting
Hi,
I would like to use a shell variable $amp in my perl command line.
for fa in $WORKSPACE/*.fa; do
amp=`grep ">.*" $fa | sed -e's#>\(.*\)#\1#g'`
ampsam="$WORKSPACE/$base/$base.$amp.sam"
sqheader=`grep "^@SQ.*SN:$amp.*" $sam`
printf "$sqheader\n" >> $ampsam
... (3 Replies)
Discussion started by: jdilts
3 Replies
9. Shell Programming and Scripting
Q 1. Write a shell script to print the following pattern upto n (specified by user)-
@
@@
@@@
@@@@
@@@
@@
@
Please help! :) (1 Reply)
Discussion started by: heatedline
1 Replies
10. Shell Programming and Scripting
Hi,
I have a shell script, In which i have variable "var1" and some perl command inside shell script.
export var1='coep -n rst-a2p-hinje.vci.all.com -c'
perl -pi -e 's/^/coep -n rst-a2p-hinje.vci.all.com -c /' command.txt
currently I am adding value of var1 in command.txt file by... (2 Replies)
Discussion started by: rakeshtomar82
2 Replies