10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using a for loop to copy files from say DIR1 and DIR2 to DIR3.I have to check whether files are copied from DIR1 and DIR2 and print the respective message.
@path=("$DIR1","$DIR2");
foreach (@path) {
$rc=system("cp $_/*xml $DIR3");
if ($rc == 0)
{
print "Files were copied... (1 Reply)
Discussion started by: liyakathali
1 Replies
2. Shell Programming and Scripting
hello friends,
i have written one perl script.Which opens a file and search for some parameter's value and gets the status of these parameters. but while i am trying to return these value always i am getting false. Can any one please help me..
here is that function:
=======================... (5 Replies)
Discussion started by: harpal singh
5 Replies
3. Shell Programming and Scripting
Scenario: Users drop files into a directory which is regularly polled by my PERL process. On detecting a file my process will move it from the poll dir to a working directory. A user created a file with a £ symbol in the filename and my process now fails.
e.g £££F3AERO££.txt
... (1 Reply)
Discussion started by: thefal9
1 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have a little problem with lstat.
I use the find utility, to find a path for a file in my system.
After that,I take that path and I pass it in lstat, but lstat returns -1, and this error : no such file or directory.
So I m trying to "ls" the path in the shell, but it also fails.
... (2 Replies)
Discussion started by: garag11
2 Replies
5. Programming
Hello,
I have a little problem with lstat.
I use the find utility, to find a path for a file in my system.
After that,I take that path and I pass it in lstat, but lstat returns -1, and this error : no such file or directory.
So I m trying to "ls" the path in the shell, but it also fails.
... (1 Reply)
Discussion started by: garag11
1 Replies
6. Shell Programming and Scripting
Hi,
I have this script in ksh, what it does is loop every ip in the nodes_nso and produced another variable up_nodes_nso of only ip's that are up.
nodes_nso=$(cat /var/tmp/nodes.txt)
echo "ICMP Tests:"
up_nodes_nso=""
for ip in ${nodes_nso} ; do
ping ${ip} 3 > /dev/null
if ; then
... (1 Reply)
Discussion started by: borderblaster
1 Replies
7. Programming
Hi,
We are using lstat in our project.
But in case of the path length more than 1024, it's returning error ENAMETOOLONG. Is there any another system call which is supporting more than 1024 path and providing the same info as lstat.
Thanks (2 Replies)
Discussion started by: Saurabh78
2 Replies
8. Shell Programming and Scripting
Hello All,
I have a perl script , and the STDERR and additional FH is redirected to the STDOUT like below:
open STDOUT ,">>$log" or die "$! :: $log\n";
open STDERR ,">&STDOUT" or die "$! :: Can redirect STDERR to STDOUT\n";
select STDERR; $|=1;
open LOG ,">&STDOUT" or die "$! :: Can... (2 Replies)
Discussion started by: Alalush
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a perl script(1.pl) that calls a c function defined in another file sample.c
#!/usr/bin/perl
my $re = 1;
my @s = `/home/PERL_SCRIPTING/Rough/sample pline $re 10`;
print "$_" foreach(@s);
The sample.c is as bwlow:
# include <stdio.h>
int pline(int, int);... (4 Replies)
Discussion started by: jisha
4 Replies
10. Shell Programming and Scripting
About System and Perl: Sun Solaris 5.9 sparc, Perl 5.6.1
I've decided to use the perl file::find module to look for all the SETUID and SETGID files on my unix boxes. I wrote something like this: (I've shorted it a little to make it simple)
#!/opt/perl/bin/perl
use File::Find;
find... (1 Reply)
Discussion started by: x96riley3
1 Replies