Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Dear friends, following is the output of a script from which I want to remove spaces and new-line characters.
Example:-
Line1 abcdefghijklmnopqrstuvwxyz
Line2 mnopqrstuvwxyzabcdefghijkl
Line3 opqrstuvwxyzabcdefdefg
Here in above example, at every starting line there is a “tab” &... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I am trying to import the "xmlrpclib" Module from Activepython 2.5 in einer older Python 2.2.
Already achived this on a SUSE Linux server, but I am now required to do it on a AIX server.
Resolved the first few error messages by copying files from Activepython to Python but
I can't get the... (0 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Okay, so I have a rather large text file and will have to process many more and this will save me hours of work.
I'm not very good at scripting, so bear with me please.
Working on Linux RHEL
I've been able to filter and edit and clean up using sed, but I have a problem with moving lines.
... (9 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 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)