...
How can I save that into a .pl file, and run it later?
and how about only showing the current year?
...
How to save it into a .pl file ?
Well, open up your favorite text editor, type in the Perl program, save and quit so that "cat -n basic.pl" spews something like the following:
The program takes into account the current year requirement as well.
Hello everyone. I am new to linux and need help again. I need help converting this bash shell to linux:
for i in `ls -l *.txt`
do
`./cnvidtf.pl $i`
`curl -u login:pswd --disable-espv -T loadfile.seq ftp://11.1.11.1`
`mysql -u login -h 11.1.11.1 -ppswd < lddocs.sql`
done
Thanks! Any help... (6 Replies)
Hello Everyone,
I have this code misbehaving in one of my scripts, I have a var containing the sequential number of the day for the year and I am suppose to get the regular date for that day and its weekday.
If I set the day to 273 I get back 2008/09/31 which is not a proper date.
can you help... (7 Replies)
Hi,
I have searched, read and tried, but no luck.
I have this code:
#!/bin/perl -w #-d
use strict;
use POSIX qw(strftime);
my $getprpw_list="/usr/lbin/getprpw -l";
my $host = "nbsol151";
my $user = "genadmin";
my %uid;
my %spwchg;
my %upwchg;
my %slogint; (2 Replies)
I have oracle 9i database installed with UTF-8 Encoding.
I want a perl script that converts unicode to utf8 before commiting in database and utf8 to unicode when retreiving from database
For example :
the word Ïntêrnatïônàlîzâtion has to be stored in database as Internationalization and when retreived... (6 Replies)
I want a perl script that converts special characters (French, German, Italy, Denmark character set) into database compatible format and retrieves the back in the original format.
A generic functionality will be developed which converts any special characters (having > 8 bit format).
I tried... (3 Replies)
Hai ! I am doing a research on Bioinformatics and a part of the code in perl have to be converted to shell scripting. I am new to shell programming. Pls. kindly help me to convert this code to shell script though it is somewhat lengthy.
PLS KINDLY HELP ME. THANKS IN ADVANCE.
my @FreeEnergy =... (1 Reply)
Hi,
I have a file as below
I need to overwrite the 2 nd column alone to numeric format like "06122011030414012345" as per the timestamp value
output file should be
the microseconds can be neglected if required.
Any help will be appreciated.
Thanks in advance (1 Reply)
How to convert below bash code in perl and python.
for BLOCK in /sys/block/emcpow*
do
echo "100000" > "$BLOCK"/queue/nr_requests
echo "noop" > "$BLOCK"/queue/scheduler
done (2 Replies)
Hello Sir,
How can i convert below two loop lines in perl
for BLOCK in /sys/block/myblock*
for BLOCK in /dev/myblock*
How i can write them in perl like
foreach( </sys/block/myblock*/queue/nr_requests> ) (5 Replies)
Dear All,
I need to print the below value from excel column
20160219T05:21:59+0100
to
19-FEB-2016 05:21:11
Can anyone help on this datetime format conversion.
Please suggest in print logic itself.
Regards,
Kumaresan P (6 Replies)
Discussion started by: Kumaresanpvk
6 Replies
LEARN ABOUT DEBIAN
accounting
ACCOUNTING(1) SMPPPD ACCOUNTING(1)NAME
accounting - calculates statistics about your internet connections
DESCRIPTION
accounting is a simple program to calculate statistics about your internet dial-up connections that are started and stopped by either ifup
and ifdown or by a frontend to smpppd like cinternet , qinternet or kinternet.
OPTIONS
These options are recognized by accounting. If a long option shows an argument as mandatory, then it is mandatory for the equivalent short
option also.
-l, --last=NUM
Only consider the last NUM connections.
-a, --after=DATE
Only consider connections started after DATE. DATE is a date with optional time in ISO 8601 format, e.g. `2002-12-24 20:15:00'.
Note that a date without time is treated as if the time is 00:00:00. Hence connections started on the specified date are consid-
ered.
-b, --before=DATE
Only consider connections started before DATE.
-u, --user=USER
Only consider connections started by user USER.
--this-year
Only consider connections started this year.
--last-year
Only consider connections started last year.
--this-month
Only consider connections started this month.
--last-month
Only consider connections started last month.
--this-week
Only consider connections started this week.
--last-week
Only consider connections started last week.
--today
Only consider connections started today.
--yesterday
Only consider connections started yesterday.
--per-year
Show summaries on a per year basis.
--per-month
Show summaries on a per month basis.
--per-week
Show summaries on a per week basis.
--per-day
Show summaries on a per day basis.
-c, --connections
Only list the connections but do not show provider statistics.
-p, --providers
Do not list the connections only show the provider statistics.
--connection-format=FORMAT
The names of the columns to print in the connection list. The names must be separated by a comma. Known column names are time,
type, provider, user, status, duration, rx, tx, rxtx, averx, avetx and averxtx. Each name may be appended by a colon and a number
indicating the width for the column, e.g. provider:25. The value will not be truncated if the width is too small.
--provider-format=FORMAT
The names of the columns to print in the provider list equivalent to the --connection-format option. Known column names are
provider, number, duration, rx, tx, rxtx, aveduration, averx, avetx and averxtx.
--local
Display all dates in local time. Also interpret dates on the command line in local time. This is the default.
--utc Display all dates in UTC. Also interpret dates on the command line in UTC.
--script[=STYLE]
Format output for script. Known styles are c and sh.
-f, --file=NAME
Use a different file with accounting information.
--report-errors
Report erros in the accounting file.
--version
Show program version and exit.
--help Show help information and exit.
NOTES
All informations are only obtained through the accounting log. Hence the informations, esp. the data volume, of currently active connec-
tions is not accurate. If you want the know the status of a connection, use ifstatus or a frontend to smpppd like cinternet , qinternet or
kinternet instead.
The user field is empty for connections started by a remote frontend of smpppd.
BUGS
Not yet implemented for ISDN (ippp).
FILES
/var/log/smpppd/accounting.log
File containing accounting information.
SEE ALSO
kinternet, qinternet, cinternet(1), smpppd(8), smpppd-ifcfg(8).
AUTHOR
Arvin Schnell <arvin@suse.de>
SuSE December 2002 ACCOUNTING(1)