Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
i have a directory in which there are executable files and these files are added at runtime. now i need a shell script which will be called at a certain interval. this shell script should find the latest executable file in that directory and start that executable. care should be taken that once the... (6 Replies)
Hi everyone,
Please help:)
I have a list of 1000 different files which comes daily to the directory.Some of
the files are not coming to the directory now.
I need to write a shell script to find the latest date and time of the files they
came to the directory. The files should be unique.... (1 Reply)
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Hello All,
I need a bash shell script to find out a day from the date.For example we give the date(20100227/YYYYMMDD) then we get the day 'Saturday'.
Thanks in advance,
Satheesh (5 Replies)
I try to find the first day of our calender. So I used this script ...
echo -n "The week of the date 01jan0001 : "
echo -n `date -d 00010101 +%A`
echo
But its shows error
bash-3.1$ sh first_day.shThe week of the date 01jan0001 : date: invalid date `00010101' (3 Replies)
Hi, I need help to convert the filenames of my 9-year daily files (1999-2007) from a julian day to yyyy-mm-dd format. my original files are patterned likes the ones below.
1999001.txt
1999002.txt
1999003.txt
1999004.txt ...
1999365.txt
desired output:
19990101.txt
19990102.txt... (3 Replies)
Hi Experts,
i am using the below code get the date of previous day.
#!/usr/bin/ksh
datestamp=`date '+%Y%m%d'`
yest=$((datestamp -1))
echo $yest
When i execute the code i am getting output as:
20130715
What i am trying here is, based on the date passed i am fetching previus day's... (0 Replies)
I have a below file
FILE.cfg
JAN_01
VAR1=4
VAR2=SUM
VAR3=PRIVATE
JAN_10
VAR1=44
VAR2=GUN
VAR3=NATUR
JAN_20
VAR1=3
VAR2=TQN
VAR3=COMMA
code: (JAN_10 is argument passed from script) (6 Replies)
Discussion started by: Roozo
6 Replies
LEARN ABOUT DEBIAN
io::tiecombine
IO::TieCombine(3pm) User Contributed Perl Documentation IO::TieCombine(3pm)NAME
IO::TieCombine - produce tied (and other) separate but combined variables
VERSION
version 1.002
SYNOPSIS
First, we set up a bunch of access points:
my $hub = IO::TieCombine->new;
my $str_ref = $hub->scalar_ref('x');
my $fh = $hub->fh('x');
my $callback = $hub->callback('x');
tie my $scalar, $hub, 'x';
tie local *STDOUT, $hub, 'x';
tie local *STDERR, $hub, 'err';
Then we write to things:
$$str_ref .= 'And ';
print $fh "now ";
$callback->('for ');
$scalar .= 'something ';
print "completely ";
warn "different.
";
And then:
$hub->combined_contents; # And now for something completely different.
$hub->slot_contents('x'); # And now for something completely
$hub->slot_contents('err'); # different.
ACHTUNG!! Because of a serious problem with Perl 5.10.0, output sent to a tied filehandle using "say" will not have the expected newline.
5.10.1 or later is needed. Since 5.10.0 is broken in so many other ways, you should really upgrade anyway.
METHODS
new
The constructor takes no arguments.
combined_contents
This method returns the contents of all collected data.
slot_contents
my $str = $hub->slot_contents( $slot_name );
This method returns the contents of all collected data for the named slot.
clear_slot
$hub->clear_slot( $slot_name );
This sets the slot back to an empty string.
fh
my $fh = $hub->fh( $slot_name );
This method returns a reference to a tied filehandle. When printed to, output is collected in the named slot.
scalar_ref
my $str_ref = $hub->scalar_ref( $slot_name );
This method returns a reference to scalar. When appended to, the new content is collected in the named slot. Attempting to alter the
string other than by adding new content to its end will result in an exception.
callback
my $code = $hub->callback( $slot_name );
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-02-26 IO::TieCombine(3pm)