05-29-2013
I see what your doing here and that looks like a very easy approach thanks! Thats what i love about unix, i was trying something far far more long winded, so i love your spin on it!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I would like to list latest 2 days, 3 days or 4 days,etc of files in the directory...
how? is it using ls? (3 Replies)
Discussion started by: happyv
3 Replies
2. Shell Programming and Scripting
Hi There,
Can you help me writing an unix script which tells me number of working days between two dates. say d1 and d2. The answer should be Integer.
is it possible in Unix.
cheers, (1 Reply)
Discussion started by: rahulkav
1 Replies
3. Shell Programming and Scripting
I am trying to write a script to backup my laptop to a NAS drive using rsync. I want the backup to be done, only if it has been more than a week since my last backup.
Each time the rsync command executes, I also create a file backuptime.txt file, with the time at which the script completed the... (1 Reply)
Discussion started by: anandjayaraman
1 Replies
4. Shell Programming and Scripting
i need a script that can tell me the date 2 days ago or 3 days ago.
please help (7 Replies)
Discussion started by: tomjones
7 Replies
5. Shell Programming and Scripting
Hi..
Am using diff to compare 2 directories(A & B) and as ouput i get a list of files which are found only in directory B ( I used grep & sed to create the list).
Now I want to delete the files which are found only in dir B after 3 days.
Please help me with this.
Thanks
CoolAtt (7 Replies)
Discussion started by: coolatt
7 Replies
6. Shell Programming and Scripting
Hi.. i have written a shell script and made this script to run on every day night 11: 55 pm using a cron job.
This cron job running for some days and is not running for some day. but i need this script to run every day night. Please help me.
Here is the cron tab entries,
55 23 * * *... (1 Reply)
Discussion started by: vidhyaS
1 Replies
7. Shell Programming and Scripting
I am unable to get this KSH script to work. Can someone help. I've been told this should work with KSH93. Which I think I have on Solaris 10.
If I do a grep -i version /usr/dt/bin/dtksh I get
@(#)Version M-12/28/93d
@(#)Version 12/28/93
@(#)Version M-12/28/93
This is correct for... (5 Replies)
Discussion started by: thibodc
5 Replies
8. How to Post in the The UNIX and Linux Forums
I am trying to get last 5 business day .
trying
for d in Mon Tue Wed Thu Fri
do
date +%Y%m%d -d "last $d"
done
gives me date
Thu Oct 20 23:56:26 EDT 2016
20161017
20161018
20161019
20161013
20161014
expected output should be
20161017
20161018
20161019
20161020 (1 Reply)
Discussion started by: abhii
1 Replies
9. UNIX for Beginners Questions & Answers
How to find a file that's modified more than 2 days ago but was modified less than 5 days ago by use of any Linux utility ? (4 Replies)
Discussion started by: abdulbadii
4 Replies
10. UNIX for Beginners Questions & Answers
Hello my friends,
I've come across the weirdest of glitches.
I'm running a simple weather monitor (just temperature) on a Raspbeery Pi 3B (Raspbian Linux 4.14.98-v7+). It has a 3G modem that sends out simple packets to my server at home.
On june 5th I lost remote access to the device.... (1 Reply)
Discussion started by: OmahaWiz
1 Replies
LEARN ABOUT DEBIAN
lib::core::only
lib::core::only(3pm) User Contributed Perl Documentation lib::core::only(3pm)
NAME
lib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs
SYNOPSIS
use lib::core::only; # now @INC contains only the two core directories
To get only the core directories plus the ones for the local::lib in scope:
$ perl -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl
To attempt to do a self-contained build (but note this will not reliably propagate into subprocesses, see the CAVEATS below):
$ PERL5OPT='-Mlib::core::only -Mlocal::lib=~/perl5' cpan
DESCRIPTION
lib::core::only is simply a shortcut to say "please reduce my @INC to only the core lib and archlib (architecture-specific lib) directories
of this perl".
You might want to do this to ensure a local::lib contains only the code you need, or to test an App::FatPacker tree, or to avoid known bad
vendor packages.
You might want to use this to try and install a self-contained tree of perl modules. Be warned that that probably won't work (see
"CAVEATS").
This module was extracted from local::lib's --self-contained feature, and contains the only part that ever worked. I apologise to anybody
who thought anything else did.
CAVEATS
This does not propagate properly across perl invocations like local::lib's stuff does. It can't. It's only a module import, so it only
affects the specific perl VM instance in which you load and import() it.
If you want to cascade it across invocations, you can set the PERL5OPT environment variable to '-Mlib::core::only' and it'll sort of work.
But be aware that taint mode ignores this, so some modules' build and test code probably will as well.
You also need to be aware that perl's command line options are not processed in order - -I options take effect before -M options, so
perl -Mlib::core::only -Ilib
is unlike to do what you want - it's exactly equivalent to:
perl -Mlib::core::only
If you want to combine a core-only @INC with additional paths, you need to add the additional paths using -M options and the lib module:
perl -Mlib::core::only -Mlib=lib
# or if you're trying to test compiled code:
perl -Mlib::core::only -Mblib
For more information on the impossibility of sanely propagating this across module builds without help from the build program, see
http://www.shadowcat.co.uk/blog/matt-s-trout/tainted-love <http://www.shadowcat.co.uk/blog/matt-s-trout/tainted-love> - and for ways to
achieve the old --self-contained feature's results, look at App::FatPacker's tree function, and at App::cpanminus's --local-lib-contained
feature.
AUTHOR
Matt S. Trout <mst@shadowcat.co.uk>
LICENSE
This library is free software under the same terms as perl itself.
COPYRIGHT
(c) 2010 the lib::core::only "AUTHOR" as specified above.
perl v5.14.2 2011-02-18 lib::core::only(3pm)