03-08-2016
Thank you, I am now using awk to accomplish this task. This helped a lot, thank you!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'am using HP-UX.I have a input file which has 102 drop statements in it.I'am using csplit to split the files.The upper limit is 99 only.I'am using the -n 102 option.It says "suffix size not vaild".Any suggestions how to do it using csplit?
Thanx in advance,
sounder. (1 Reply)
Discussion started by: sounder123
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
How can i split the big file by the lines?. For eg. I wanna split the file from the line 140 to 1700. (9 Replies)
Discussion started by: sharif
9 Replies
3. Shell Programming and Scripting
Hi,
I needs to split *.txt files from single directory depends on the some mutltiple input values. i have wrote the code like below
for file in *.txt
do
grep -i -h "value1|value2" $file > $file;
done.
My requirment is more input values needs to be given in grep; let us say 50... (3 Replies)
Discussion started by: arund_01
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have some files with 2 million odd records which i need to split into chunks of 0.5 millions. I have the file sorted with a key column in order. The same key value can appear as 4 or 5 records in the file.
Hence after splitting we are checking whether all the key values are present in the... (5 Replies)
Discussion started by: dnat
5 Replies
5. Shell Programming and Scripting
Hi,
I have an input file like:
111
abcdefgh
asdfghjk
dfghjkl
222
aaaaaaa
bbbbbb
333
djfhfgjktitjhgfkg
444
djdhfjkhfjkghjkfg
hsbfjksdbhjkgherjklg
fjkhfjklsahjgh
fkrjkgnj
I want to read this input file and make separate output files with the header as numric value like "111"... (9 Replies)
Discussion started by: saltysumi
9 Replies
6. Shell Programming and Scripting
Hi
extending to one of my previous posted query ....
I am using
nawk -v invar1="$aa" '{print > ("ABS\_"((/\|/)?"A\_":"B\_")invar1"\_NETWORKID.txt")}' spfile.txt
to get 2 different files based on split condition i.e. "|"
Similar to invar1 variable in nawk I also need one more variable... (18 Replies)
Discussion started by: shekharjchandra
18 Replies
7. UNIX for Dummies Questions & Answers
Hi Gurus,
Lets say i have a file with some 30 records...
How can i split that file into 3 files
Also it shud be dynamic in the sense..
I wouldnt mind if file 1 has 15, file 2 has 10 and file 3 has 5....
Please help..
Thanks (6 Replies)
Discussion started by: saggiboy10
6 Replies
8. Shell Programming and Scripting
Hello all
I have a file which has around 80 million records, I want to split it to 12 equal files, I tried using the split command but it is allowing me to split according to number of lines or by size. Is there a way i can split the file into 12 files without worrying about the number of lines... (7 Replies)
Discussion started by: Sri3001
7 Replies
9. Shell Programming and Scripting
I want a script to split my file upon the last field (15)
As file
A,b,c,.......,01
C,v,n,.......,02
C,r,v,........,01
F,s,a,........,03
X,y,d,........,99
To make output
01.txt
A,b,c,.......,01
C,r,v,........,01
02.txt
C,v,n,.......,02 (12 Replies)
Discussion started by: teefa
12 Replies
10. UNIX for Beginners Questions & Answers
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT DEBIAN
poe::component::irc::plugin::logger
POE::Component::IRC::Plugin::Logger(3pm) User Contributed Perl Documentation POE::Component::IRC::Plugin::Logger(3pm)
NAME
POE::Component::IRC::Plugin::Logger - A PoCo-IRC plugin which logs public, private, and DCC chat messages to disk
SYNOPSIS
use POE::Component::IRC::Plugin::Logger;
$irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->new(
Path => '/home/me/irclogs',
DCC => 0,
Private => 0,
Public => 1,
));
DESCRIPTION
POE::Component::IRC::Plugin::Logger is a POE::Component::IRC plugin. It logs messages and CTCP ACTIONs to either #some_channel.log or
some_nickname.log in the supplied path. In the case of DCC chats, a '=' is prepended to the nickname (like in irssi).
The plugin tries to detect UTF-8 encoding of every message or else falls back to CP1252, like irssi (and, supposedly, mIRC) does by
default. Resulting log files will be UTF-8 encoded. The default log format is similar to xchat's, except that it's sane and parsable.
This plugin requires the IRC component to be POE::Component::IRC::State or a subclass thereof. It also requires a
POE::Component::IRC::Plugin::BotTraffic to be in the plugin pipeline. It will be added automatically if it is not present.
METHODS
"new"
Arguments:
'Path', the place where you want the logs saved.
'Private', whether or not to log private messages. Defaults to 1.
'Public', whether or not to log public messages. Defaults to 1.
'DCC', whether or not to log DCC chats. Defaults to 1.
'Notices', whether or not to log NOTICEs. Defaults to 0.
'Sort_by_date', whether or not to split log files by date, i.e. #channel/YYYY-MM-DD.log instead of #channel.log. If enabled, the date will
be omitted from the timestamp. Defaults to 0.
'Strip_color', whether or not to strip all color codes from messages. Defaults to 0.
'Strip_formatting', whether or not to strip all formatting codes from messages. Defaults to 0.
'Restricted', set this to 1 if you want all directories/files to be created without read permissions for other users (i.e. 700 for dirs and
600 for files). Defaults to 1.
'Format', a hash reference representing the log format, if you want to define your own. See the source for details.
'Log_sub', a subroutine reference which can be used to override the file logging. Use this if you want to store logs in a database instead,
for example. It will be called with 3 arguments: the context (a channel name or nickname), a type (e.g. 'privmsg' or '+b', and any
arguments to that type. You can make use "default_format" to create logs that match the default log format. Note: You must take care of
handling date/time and stripping colors/formatting codes yourself.
Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method.
"default_format"
Returns a hash reference of type/subroutine pairs, for formatting logs according to the default log format.
AUTHOR
Hinrik Oern Sigur`sson, hinrik.sig@gmail.com
perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::Logger(3pm)