10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
One of my Unix scripts needs to look for files coming in on Fridays. This script runs on Mondays. $date +"%y%m%d" will give me today's date. How can I get previous Friday's date.. can I do "today's date minus 3 days" to get Friday's date? If not, then any other way?? Name of the files is... (4 Replies)
Discussion started by: juzz4fun
4 Replies
2. Shell Programming and Scripting
What are the pros & cons, if any, between using Perl's copy module vs OS's system cp, for copying a file to another directory? Or are they exactly the same?
1) Perl's File::Copy module, as in
copy ($filename, $dest_path) or die "ERROR: Cannot copy\n";
2)
if (system ("cp $filename,... (3 Replies)
Discussion started by: slchin
3 Replies
3. Shell Programming and Scripting
Hi I'm new to Perl and the forum. I've done a quick search on my question but I didn't see an answer. I sincerely apologize if this question has been asked.
I'm trying to have my perl scrip recognize system variable $USER such that:
my $test_path = "/temp/\$USER/g03/Gau-11097.EIn";
open... (2 Replies)
Discussion started by: jhbamboo
2 Replies
4. Shell Programming and Scripting
I am new in Perl.
I am working in simple script and the varibles are working well outside the exec or system command.
but they don't work as parameters to exec or system command.
The script is attached.
please help. (8 Replies)
Discussion started by: ahmed_zaher
8 Replies
5. 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
6. UNIX for Advanced & Expert Users
Hey all,
:D
Could you please check following way of writing awk is correct or not ???
-----------------------------------------------------------
-----------------------------------------------------------------
Its recursion being called.
tempgrep.txt has :
462948
1311040
880922... (12 Replies)
Discussion started by: varungupta
12 Replies
7. Shell Programming and Scripting
Hi,
I'm wanting to run an nslookup, dig or whatever to check for the existence of a printer. The PERL script will display the results on the screen, but I can't figure out how to capture the result & test the value. Any ideas will be greatly appreciated!!! Thank You (1 Reply)
Discussion started by: lorik
1 Replies
8. Programming
Dear all,
In my code,i am planning to use memset function to re-initialise an array before populating it everytime. Will using memset function be an overload to the program? (3 Replies)
Discussion started by: ranj@chn
3 Replies
9. Shell Programming and Scripting
Can this be done without using te system command? I have a directory with a large number of files in it, but I am interested in only the 8 most recent.
The directory looks like
-rw-rw-rw- 1 adsm adsm 13412 Sep 22 08:31 events_dump_09222005.csv.gz
-rw-rw-rw- 1 adsm adsm ... (5 Replies)
Discussion started by: reggiej
5 Replies
10. UNIX for Dummies Questions & Answers
Hi All, :confused:
I have the following code.
var=' '
sqlplus user/pass@DB <<EOF
whenever sqlerror exit 1
select package.func() into $var from dual;
EOF
echo $var
But, this code does not work to display the value returned by the oracle function. Do we have to bind variables before... (3 Replies)
Discussion started by: rahulrathod
3 Replies