02-04-2009
It's because you're trying to communicate with a nonexistent co-process. Try using print, instead of print -p.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I'm developing a system which requires me to run a ksh script from within a cgi script. What sort of syntax will I need to do this, I'm sure it's simple but can't find out how anywhere!
Thanks. (1 Reply)
Discussion started by: hodges
1 Replies
2. Shell Programming and Scripting
In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments.
FINDIT="ps -ef | grep oracle | grep DBexport | grep rshrc"
-or-
FINDIT="ps -ef | grep oracle | grep prod | grep runback"
I... (3 Replies)
Discussion started by: zedmelon
3 Replies
3. Shell Programming and Scripting
Hello all,
Here's the scenario:
I've got a script, let's call it script1. This script invokes another script, which we'll call set_env, via the dot "." command, like so:
File:
#!/bin/ksh
#
region_id=DEV
. set_env ${region_id}
and so on. Script set_env sets up an... (2 Replies)
Discussion started by: BriceBu
2 Replies
4. Shell Programming and Scripting
Hi All,
I wrote a script to send a mail if a particular logfile did not get updated since 5 mins. Here is the Script.
log=`date +%e_%b_%Y`.log # returns todays logfile
x=`date -r $log` # returns last modification time of the Log file
h1=`expr substr "$x" 12 2`
m1=`expr substr "$x" 15 2`... (5 Replies)
Discussion started by: AnneAnne
5 Replies
5. Shell Programming and Scripting
Hi,
I have to migrate files from one server to another .For this I am using a mapping file and ksh .The mapping file contains the source and destination directories of the files to be migrated.Each line in the mapping file corresponds to one file that is to be migrated.The ksh upon execution... (3 Replies)
Discussion started by: Kishore_1
3 Replies
6. UNIX for Dummies Questions & Answers
Hi ,
What is the diffence between executing the script like
./myscript.ksh
. ./myscript.ksh
I have found 2 difference but could not find the reason
1. If i export a variable in myscript.ksh and execute it like . ./myscript.ksh the i can access the other scripts that are present in... (5 Replies)
Discussion started by: max_hammer
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am in ksh.
below mentioned 3 commands I executed at command prompt & got the expected results.
csh
source csh_infa
<special command>
Now I have to do this in the script in ksh. I entered it as it is.
#!/bin/ksh
csh
source csh_infa
<special command>
Now after... (1 Reply)
Discussion started by: girish_kanak
1 Replies
8. Shell Programming and Scripting
Overview:
I have an AWK program that parses thru a database backup
server log file and outputs ths following parameters
SRNO DATE : TIME SIZE IN(KB) DATABASE NAME DUMP TYPE
1 May 16 2012: 13:30:00 6874 TestDB database
2 May 16 2012: 13:30:44 11462 master database
Problem:
This program has... (5 Replies)
Discussion started by: JolietJake
5 Replies
9. Shell Programming and Scripting
I am trying to call a ksh script from another ksh script.
in the called script , i am doing sum calculation(used typeset etc)
suppose a.ksh is the calling script and b.ksh is the called script .
. b.ksh (used this inside a.ksh)
this execution gives some error like bad number.
but when i... (1 Reply)
Discussion started by: urfrnddpk
1 Replies
10. Shell Programming and Scripting
Hello,
I have two "for loops" in my script and the second one is not executing the way i want.
Script:
#!/bin/ksh
IFS=' '
printf "Enter Account name: "
read A B C D E F G H I J K L M N O
for i in ${A} ${B} ${C} ${D} ${E} ${F} ${G} ${H} ${I} ${J} ${K} ${L} ${M} ${N} ${O};... (3 Replies)
Discussion started by: seekryts15
3 Replies
LEARN ABOUT DEBIAN
file::touch
Touch(3pm) User Contributed Perl Documentation Touch(3pm)
NAME
File::Touch - update access and modification timestamps, creating nonexistent files where necessary.
SYNOPSIS
use File::Touch;
@file_list = ('one.txt','../two.doc');
$count = touch(@file_list);
use File::Touch;
$reference_file = '/etc/passwd';
$touch_obj = File::Touch->new(
reference => $reference_file,
no_create => 1
);
@file_list = ('one.txt','../two.doc');
$count = $touch_obj->touch(@file_list);
DESCRIPTION
Here's a list of arguments that can be used with the object-oriented contruction:
atime_only => [0|1]
If nonzero, change only the access time of files. Default is zero.
mtime_only => [0|1]
If nonzero, change only the modification time of files. Default is zero.
no_create => [0|1]
If nonzero, do not create new files. Default is zero.
reference => $reference_file
If defined, use timestamps from this file instead of current time. Default is undefined.
atime => $time
If defined, use this time (in epoch seconds) instead of current time for access time.
mtime => $time
If defined, use this time (in epoch seconds) instead of current time for modification time.
Examples
Update access and modification times, creating nonexistent files
use File::Touch;
my @files = ('one','two','three');
my $count = touch(@files);
print "$count files updated
";
Set access time forward, leave modification time unchanged
use File::Touch;
my @files = ('one','two','three');
my $day = 24*60*60;
my $time = time() + 30 * $day;
my $ref = File::Touch->new( atime_only => 1, time => $time );
my $count = $ref->touch(@files);
print "$count files updated
";
Set modification time back, update access time, do not create nonexistent files
use File::Touch;
my @files = ('one','two','three');
my $day = 24*60*60;
my $time = time() - 30 * $day;
my $ref = File::Touch->new( mtime => $time, no_create => 1 );
my $count = $ref->touch(@files);
print "$count files updated
";
AUTHOR
Nigel Wetters Gourlay (nwetters@cpan.org)
COPYRIGHT
Copyright (c) 2001,2007,2009 Nigel Wetters Gourlay. All Rights Reserved. This module is free software. It may be used, redistributed
and/or modified under the same terms as Perl itself.
perl v5.10.0 2009-07-25 Touch(3pm)