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)
I have the following script to find out the last day of the last month .... and the output of this script is in the following format ...
Script goes like this ....
#!/bin/ksh
cur_month=`date +%m`
cur_year=`date +%Y`
prev_month=$(($cur_month-1))
# Check to see if this is January
if ... (8 Replies)
Hey all,
I have a shell that invokes a AWK.
In this AWK i want invoke a function that receives 3 parameters:
date: 20080831
time: 235901
duration: 00023
that function receive this 3 parameters and sum to this value two more seconds:
2008083123590100025
Remember that in case that... (3 Replies)
AIX 4.2
I am trying to do an rsh grep to search for date records inside server logs by doing this :
xx=`date +"%a %b %d"`
rsh xxx grep "^$XX" zzz
gives :
grep: 0652-033 Cannot open Jun.
grep: 0652-033 Cannot open 11.
But if I do :
xx=`date +"%a %b %d"`
grep "^$XX" zzz
it works... (2 Replies)
Can someone help me to convert the date format after get it from the "LAST REBOOT" command.
these is the standard output.
bash-3.00# last reboot
reboot system boot Fri Aug 6 15:07
reboot system down Fri Aug 6 15:04
reboot system boot ... (3 Replies)
Hello Team ,
I have to extract date section from the below file output. The output of the file is as shown below.
I have to extract the "" this section from the above output of the file. can anyone please let me know how can we acheive this? (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)
Hello experts!
I need your help please
I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.:
2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well.
So I want to execute
date -d '2016-11-25 03:14:50' ... (2 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
devel::beginlift
Devel::BeginLift(3pm) User Contributed Perl Documentation Devel::BeginLift(3pm)NAME
Devel::BeginLift - make selected sub calls evaluate at compile time
SYNOPSIS
use Devel::BeginLift qw(foo baz);
use vars qw($i);
BEGIN { $i = 0 }
sub foo { "foo: $_[0]
"; }
sub bar { "bar: $_[0]
"; }
for (1 .. 3) {
print foo($i++);
print bar($i++);
}
no Devel::BeginLift;
print foo($i++);
outputs -
foo: 0 bar: 1 foo: 0 bar: 2 foo: 0 bar: 3 foo: 4
DESCRIPTION
Devel::BeginLift 'lifts' arbitrary sub calls to running at compile time - sort of a souped up version of "use constant". It does this via
some slightly insane perlguts magic.
import
use Devel::BeginLift qw(list of subs);
Calls Devel::BeginLift->setup_for(__PACKAGE__ => @list_of_subs);
unimport
no Devel::BeginLift;
Calls Devel::BeginLift->teardown_for(__PACKAGE__);
setup_for
Devel::BeginLift->setup_for($package => @subnames);
Installs begin lifting magic (unless already installed) and registers "${package}::$name" for each member of @subnames to be executed when
parsed and replaced with its output rather than left for runtime.
teardown_for
Devel::BeginLift->teardown_for($package);
Deregisters all subs currently registered for $package and uninstalls begin lifting magic is number of teardown_for calls matches number of
setup_for calls.
setup_for_cv
$id = Devel::BeginLift->setup_for_cv(&code);
Same as "setup_for", but only registers begin lifting magic for one code reference. Returns an id to be used in "teardown_for_cv".
teardown_for_cv
Devel::BeginLift->teardown_for_cv($id);
Deregisters begin lifting magic referred to by $id.
AUTHOR
Matt S Trout - <mst@shadowcatsystems.co.uk>
Company: http://www.shadowcatsystems.co.uk/ Blog: http://chainsawblues.vox.com/
LICENSE
This library is free software under the same terms as perl itself
perl v5.14.2 2012-04-22 Devel::BeginLift(3pm)