09-11-2017
Thank You.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
It would be highly appreciable if any one helps me in this. I am trying to get it done through Java but I love unix and believe it can be done within minutes with couple of lines.
The input log file is a text file contains multiple entries seperated by a blank line.
Each seperated entry... (7 Replies)
Discussion started by: hareeshram
7 Replies
2. UNIX for Dummies Questions & Answers
hello:
i have a file and i am trying to extract only unique words from that file.
i used the command: cat messages.1 | tr " " "\n" | sort | uniq -c
but using this command outputs everything unique in the file be it words, numbers, like all the characters..i need a command which will only... (6 Replies)
Discussion started by: vikbenq
6 Replies
3. Homework & Coursework Questions
You are given a 1 year logfile with each line starting with a date in the form “YYYY-MM-DD”. How would you extract logs from the 4th day of each month and put them into a new file (1 Reply)
Discussion started by: DOkuwa
1 Replies
4. Shell Programming and Scripting
Hello,
I have a log file for the year, which contains lines starting with the data in the format of YYYY-MM-DD. I need to get all the lines that contain the DD being 04, how would I do this? I tried using grep "*-*04" but it didn't work.
Any quick one liners I should know about?
Thank you. (2 Replies)
Discussion started by: cpickering
2 Replies
5. Shell Programming and Scripting
One of the log file looks like entries as below.
Wed Apr 6 14:51:18 2011 FAIL LOGIN: Client "9.191.21.54"
Wed Apr 6 14:52:53 2011 CONNECT: Client "9.191.21.54"
Wed Apr 6 14:52:54 2011 OK LOGIN: Client "9.191.21.54"
Wed Apr 6 14:55:10 2011 CONNECT: Client "9.191.21.54"
Wed Apr 6... (2 Replies)
Discussion started by: rijeshpp
2 Replies
6. Shell Programming and Scripting
I'm new to all this and I've been fiddling with this problem for HOURS and feel silly that I can't work it out!
I have a .log file that VERY long and looks like this:
2011-08-31 10:03:34 SUESTART AG Amndmnt Client WebRequest DNU SUEEND Sequence: 600,
2011-08-31 10:03:34 SUESTART... (11 Replies)
Discussion started by: SusieSA
11 Replies
7. Shell Programming and Scripting
Hi all,
Hope someone here will be able to help me. Our system has some scripts that are run from a cron job every ten mins and is used to see how many error there are in that time frame. Problem is that in the scripts grep is used to find the data, but as the day goes on these log file grow to a... (7 Replies)
Discussion started by: Goldengreen
7 Replies
8. Shell Programming and Scripting
Hi
I am trying to extract data from within a log file and output format to a new file for further manipulation can someone provide script to do this?
For example I have a file as below and just want to extract all delimited variances of tag 32=* up to the delimiter "|" and output to a new file... (2 Replies)
Discussion started by: Buddyluv
2 Replies
9. Shell Programming and Scripting
I am running awk command to extract data from log file to calculate last 15 minutes log using below command and now i am getting bellow error:
awk '$0>=$from' from=$(`date -u +"####<%d-%b-%Y %H:%M:%S o'clock GMT>"-15min`) test.log
Error:
date: 0551-402 Invalid character in date/time... (8 Replies)
Discussion started by: oberoi1403
8 Replies
10. Shell Programming and Scripting
Hi
I have a daily rsync that runs and i am trying to find a easy way of extracting the start time and end time of the sync and extract the details of how much data was copied.
I would like to use this information to see if i can increase the amount of rsyncs that run in a day.
so the log... (3 Replies)
Discussion started by: treds
3 Replies
PTSB(1p) User Contributed Perl Documentation PTSB(1p)
NAME
ptsb - Interact with you Permanent TSB homebanking from your shell!
SYNOPSIS
ptsb [options]
Print accounts balance:
"ptsb [ -F /path/of/conf/file ] -b"
Print account statement:
"ptsb [ -F /path/of/conf/file ] -s -a c -n <4digits" -f yyyy/mm/dd -t yyyy/mm/dd>
If your are running Linux you can use the date --date command to simplify the date range definition. You can put these aliases on your
~/.bashrc:
alias ptsb_stat='ptsb --statement -a c -n xyzt'
alias ptst_last_month="statement_current -f `date +%Y/%m/%d --date='1 month ago'` -t `date +%Y/%m/%d`"
OPTIONS
-h | --help
this help usage message!
-D | --debug
Enable debug. This will be more verbose and will leave html on the current working directory.
-F /path/to/config/file | --file /path/to/config/file
filename configuration file path (default: ~/.ptsbrc). Please refer to manual page to see how this file is built.
-b | --balance
print account balance
-s | --statement
print account statement
-T type | --transation-type type
Type of transaction to look on the statement. Type can be: ALL, WITHDRAWAL, DEPOSIT
-f | --from--date yyyy/mm/dd
from date
-t | --to-date yyyy/mm/dd
to date
-a [c | v] | --account-type [c | v]
account type: can be 'c' (current account) or 'v' for (visa card)
-n digits | --account-num digits
4 digits representing the last 4 digits of the account number or visa card number.
-N | --no-balance
Do not print balance when printing statement.
-r | --regexp
When printing statement grep using the regexp provided
-e | --expr
where expression is a mathematical expression like
'<300'
'=300'
'>=300'
the expression will test the euro amount column only lines matching the expression will be printed
-g | --graph
Print graph of the statement using gnuplot. Gnuplot is required!
-i path | --image path
Save PNG image in path.
-o filename | --output filename
Save the output of the statement inside a CSV file named filename. CSV format is:
date,description,amount,balance
last field presence depends on the -N flag.
-v | --version
Print version
CONFIGURATION FILE
Configuration file default location is ~/.ptsbrc and it looks like this:
-------8< -- ~/.ptsbrc -->8----------
open24_number=your_open24_number
password=your_internet_password
pan=your_personal_access_number
-------8< --------------->8----------
However you can put wherever you want. Just remember to use then the option -F /path/to/your/location.
Lines beginning with # will be interpreted as comment.
Starting from release 0.08 ptsb will use GnuPG to encrypt the configuration file using the private key of the user. Therefore you'll have
to create your key if you didn't do this yet.
In case you want to decrypt your ptsbrc file use this command:
$ gpg -d /path/to/your/ptsbrc
This will print the encrypted file on the standard output.
SEE ALSO
o Official CPAN page for Finance::Bank::IE::PermanentTSB
http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB/lib/Finance/Bank/IE/PermanentTSB.pm
<http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB/lib/Finance/Bank/IE/PermanentTSB.pm>
o Author homepage
<http://www.pallotron.net>
o Author Blog (italian)
<http://www.vitadiunsysadmin.net>
o Author homepage on CPAN
<http://search.cpan.org/~pallotron/>
AUTHOR
Angelo "pallotron" Failla - <pallotron@freaknet.org>
BUGS
Please report bugs to the author, no bug tracking system is set up yet.
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Angelo "pallotron" Failla
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.
perl v5.12.3 2009-02-17 PTSB(1p)