11-24-2007
Unix command in Perl
Hi,
I have a perl script. It needs to open a file but the file that it will open will depend on the result of a unix command "tail -1". How can I do that in perl, to open a file which is the results from a unix command? Thanks in advance! Hope you can help me.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Is there any way to use UNIX and Perl to automate sending e-mail. I got a dynamic changing file that send out to people in my mailing list and want to experinment to see if Perl and UNIX can send it out for me when the content is change. I found a Perl source code but dont really know how to... (4 Replies)
Discussion started by: jy2728
4 Replies
2. Shell Programming and Scripting
I understand that in order to run basic unix commands I would normally type at the prompt, I would have to use the following format
system(ls -l);
or
exec(ls -l);
But when I actually try to use the command, the script fails to compile and keeps telling me there is an error with this line. ... (1 Reply)
Discussion started by: userix
1 Replies
3. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies
4. Shell Programming and Scripting
Net::SSH::Perl ...... how to print the output in a proper format
my $cmd = "ls -l";
my $ssh = Net::SSH::Perl->new($host);
$ssh->login($user, $pass);
my($stdout, $stderr, $exit) = $ssh->cmd("$cmd");
print $stdout;
the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies
5. Shell Programming and Scripting
Hello,
I have a PERL-TK based GUI from which I want to launch a command on an existing UNIX terminal (this is also the parent terminal for this perl based gui window). The command I want to launch is interactive (there is no intention to interact with that command from the same PERL gui i.e. no... (2 Replies)
Discussion started by: AnuragJindal
2 Replies
6. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
7. Shell Programming and Scripting
Am trying to lean perl scripting in Unix OS to automate my tasks.
Please find the below perl script i have tried
#!/usr/bin/perl -w
print "Please Enter the VG name to be checked:";
$A = <>;
print "Please Enter the free size to be checked in GB:";
$B = <>;
$vgcheck = `vgdisplay... (7 Replies)
Discussion started by: jayachandran87
7 Replies
8. UNIX for Dummies Questions & Answers
I am working in perl.
I need to do some svn check in from my server.
I need to install svn in my server.
I have the package "svn" in my server path
How can I install that in my server.
I tried ,
but this doesnt work. Can you please help with the command to be used.
Thanks in... (0 Replies)
Discussion started by: irudayaraj
0 Replies
9. Shell Programming and Scripting
I wish to know if there is any limitation in using unix commands in perl script or it is just we should avoid using them in our perl script.
For e.g Below is the command to get the recent file in a dir.:
$lcsvFile = `cd "$l_inputfilepath";ls -1t *.CSV|tail -1`
Is there any harm in coding... (1 Reply)
Discussion started by: Devesh5683
1 Replies
10. Shell Programming and Scripting
I tried to use this command in PERL code. when I run this on shell , it's working fine.
grep -v "^#" /oratab | awk -F: '$1 == "'$server'" {print $2}'
inside PERL
$ohome = `grep -v "^#" /oratab | awk -F: '$1 == "'$server'" {print $2}'` ;
but, it's not returning anything back ... what... (0 Replies)
Discussion started by: talashil
0 Replies
LEARN ABOUT CENTOS
purple
Purple(3) User Contributed Perl Documentation Purple(3)
NAME
Purple - Perl extension to the libpurple instant messenger library.
SYNOPSIS
use Purple;
ABSTRACT
This module provides the interface for using perl scripts as plugins
in libpurple.
DESCRIPTION
This module provides the interface for using perl scripts as plugins in Purple. With this, developers can write perl scripts that can be
loaded in Purple as plugins. The scripts can interact with IMs, chats, accounts, the buddy list, libpurple signals, and more.
The API for the perl interface is very similar to that of the Purple C API, which can be viewed at http://developer.pidgin.im/doxygen/ or
in the header files in the Purple source tree.
FUNCTIONS
@accounts = Purple::accounts
Returns a list of all accounts, online or offline.
@chats = Purple::chats
Returns a list of all chats currently open.
@connections = Purple::connections
Returns a list of all active connections.
@conversations = Purple::conversations
Returns a list of all conversations, both IM and chat, currently open.
@conv_windows = Purple::conv_windows
Returns a list of all conversation windows currently open.
@ims = Purple::ims
Returns a list of all instant messages currently open.
SEE ALSO
Purple C API documentation - http://developer.pidgin.im/doxygen/
Purple website - http://pidgin.im/
AUTHOR
Christian Hammond, <chipx86@gnupdate.org>
COPYRIGHT AND LICENSE
Copyright 2003 by Christian Hammond
This library is free software; you can redistribute it and/or modify it under the terms of the General Public License (GPL). For more
information, see http://www.fsf.org/licenses/gpl.txt
perl v5.16.3 2013-02-11 Purple(3)