Hi guys and Gals AIX 5.1
If I had a # above several scripts would it comment out everything below it?
Like this
#
01 2 ** .....................................
02 31 .........................................
# this is a script
03 12 **..........................
Would... (6 Replies)
Hi I need to add a comment line at the begining of a text file. The scenario is given below.
1. The number of servers that needs to be updated is around 80
2. The location of the text file in all the servers are the same including the file name.
3. The comment has to be added at the very... (2 Replies)
I need help with a script. Here's what I want to do.
I have a file "upsrk.txt" which can be either under "/home/upsrk" OR "/home/oracle"
On some systems file "upsrk.txt" may not exist, in that case I want to just exit out of the script.
If the file is there, I want to check if I have the... (3 Replies)
Hi,
i need some help. i am not sure about my idea.
I have a script directory under my home directory,which has a lot of scripts in it.
These are some names of the scripts in /axxhome/prdv/script
aly300.sh
axt300.sh
arv300.sh
clp300.sh
ctth300.sh
aly400.sh
axt400.sh
arv400.sh... (6 Replies)
- Concatenate files and delete source files. Also have to add a comment.
- I need to concatenate 3 files which have the same characters in the beginning and have to remove those files and add a comment and the end.
Example:
cat REJ_FILE_ABC.txt REJ_FILE_XYZ.txt REJ_FILE_PQR.txt >... (0 Replies)
Hello,
I have a file, in which line 40 is commented. It is basically a cron job,
#05,35,50 * * * * /usr/local/scripts/my.sh
how i can i verify the line 40 is commented, if not then give me message not commented, otherwise provide us message it is commented. (5 Replies)
Dear All,
I have to find a way to reorganize a table file according to the last column. The input file looks like this:
cat Input1.txt:
ID:12:23:00Q EU232 2342 234 123 231 aa1;ab2
ID:11:22:00E EU112 1232 211 112 233 ab2;ac3
ID:19:24:00S EU121 569 ... (7 Replies)
Hi All,
totally new on it , normally use it for just 1 line.
i'm looking for help.
i'm have 2 file.
file 1 :
--------------------------------------------------
c12
c1
c3
--------------------------------------------------
file 2:
other content ... (10 Replies)
Discussion started by: kttan
10 Replies
LEARN ABOUT DEBIAN
true
true(3pm) User Contributed Perl Documentation true(3pm)NAME
true - automatically return a true value when a file is required
SYNOPSIS
package Contemporary::Perl;
use strict;
use warnings;
use true;
sub import {
strict->import();
warnings->import();
true->import();
}
DESCRIPTION
Perl's "require" builtin (and its "use" wrapper) requires the files it loads to return a true value. This is usually accomplished by
placing a single
1;
statement at the end of included scripts or modules. It's not onerous to add but it's a speed bump on the Perl novice's road to
enlightenment. In addition, it appears to be a non-sequitur to the uninitiated, leading some to attempt to mitigate its appearance with a
comment:
1; # keep require happy
or:
1; # Do not remove this line
or even:
1; # Must end with this, because Perl is bogus.
This module packages this "return true" behaviour so that it need not be written explicitly. It can be used directly, but it is intended
to be invoked from the "import" method of a Modern::Perl-style module that enables modern Perl features and conveniences and cleans up
legacy Perl warts.
METHODS
"true" is file-scoped rather than lexically-scoped. Importing it anywhere in a file (e.g. at the top-level or in a nested scope) causes
that file to return true, and unimporting it anywhere in a file restores the default behaviour. Redundant imports/unimports are ignored.
import
Enable the "automatically return true" behaviour for the currently-compiling file. This should typically be invoked from the "import"
method of a module that loads "true". Code that uses this module solely on behalf of its callers can load "true" without importing it e.g.
use true (); # don't import
sub import {
true->import();
}
1;
But there's nothing stopping a wrapper module also importing "true" to obviate its own need to explicitly return a true value:
use true; # both load and import it
sub import {
true->import();
}
# no need to return true
unimport
Disable the "automatically return true" behaviour for the currently-compiling file.
EXPORT
None by default.
NOTES
Because some versions of YAML::XS may interpret the key of "true" as a boolean, you may have trouble declaring a dependency on true.pm.
You can work around this by declaring a dependency on the package true::VERSION, which has the same version as true.pm.
SEE ALSO
o latest
o Modern::Perl
o nonsense
o perl5i
o Toolkit
o uni::perl
AUTHOR
chocolateboy, <chocolate@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010-2011 by chocolateboy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2011-04-18 true(3pm)