Hi,
I have a text file contaning around 150 lines, each line is a hostname.
I want to read 4 lines/hostnames and save those 4 lines to a seperate file.
say the big file is /files/bigfile and I want to have a lot of files in /files named
/files/smallfile.1 , /files/smallfile.2 and so on...
... (1 Reply)
All, I have a file that I want to read, cut 12 lines and direct into a new file, and continue to do this until I reach the EOF. How do I do it?
can I use cat or read to do this?
the file is formated with repetitive output consisting of these 12 lines
date: <Timestamp>
dev_id: <device ID>... (7 Replies)
Hi,
My records are like this
BSC403_JAIN03|3153_TropicalFarm_LIMJM1-3_97|
BSC403_JAIN03|3410_PantaiAceh_PCEHM1_4_97|
BSC406_BMIN02|1433_JomHebohTV3_COW7M1_11_97|
I want to extract the value before _97|
This command
BSC_ID=`echo $DATA | cut -f5 -d"_"`
gives me
_97|, 4, 11
and by... (16 Replies)
Hi,
How to cut all lines in file before keyword?
from
1 2333214 word ...... some text
2 234343 234234 word ...... some text
3 234324 324 3234 word ...... some text
to
1 2333214
2 234343 234234
3 234324 324 3234 (4 Replies)
I have a script that runs a command, and the output is on multiple lines. The fields are delimited by '='. I need the 8th column from the first line and the 2nd from the second line, but I can't figure out how to display the second line.
command1 | cut -d '=' -f 8
The above gets me what I... (2 Replies)
Dears,
i want cut the lines from a log file. Example of the log file as follows..
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMDeliverContrUtil isDeliverSM
FINE:
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMUtil addSysUpMsgLog
INFO: . The message content... (1 Reply)
Hi,
I have a SQL script with "create table" and "alter table" statements and I want to cut all the alter table statements from original file (A) and move it to a different file (B).
Can you please me the option. Thanks a lot for your time. (3 Replies)
All,
I would like to cut all the lines from the log file for the timestamp . I'm not clear about how to apply grep ,awk here.Can you help me on this ?
My logfile:
**********
Wed Feb 20 03:48:26 2013
Thread 1 advanced to log sequence 400 (LGWR switch)
Thu Feb 21 02:34:23 2013... (1 Reply)
i am having a text file like below
rama
surya
pandu
latha
singh
raja
i want to get the new file from 3 to 5
i.e
pandu
latha
singh
please help (1 Reply)
Discussion started by: suryanarayana
1 Replies
LEARN ABOUT DEBIAN
mon::protocol
Mon::Protocol(3pm) User Contributed Perl Documentation Mon::Protocol(3pm)NAME
Mon::Protocol - Methods for parsing / dumping a protocol block
SYNOPSIS
use Mon::Protocol;
DESCRIPTION METHODS
new Creates a new object. A hash can be supplied which sets the default values. An example which contains all of the variables that you can
initialize:
$c = new Mon::Protocol;
dump_data
Returns the current internal structure as a string dump suitable for passing to "parse_data".
"parse_data"
Parses a command block (from begin_block to end_block), as generated by dump_data.
"type"(new_type)
Sets or returns the type of the current command block. See @TYPES for valid type codes.
In the future, it is possible that this module will perform additional checking based on the type, for now it is left to the
application to interpret this.
"get_section_list"
Returns an array containing all section names within the block.
"get_section"(section_name)
Returns a hash containing the key/value pairs of the specific section.
"delete_section"(section_name)
Completely removes the specified section from the block.
"add_to_section"(section_name,$hash_ref)
Adds the key/value pairs in the hash to the specified section.
$foo->add_to_section("_hostgroup", { "ns1.baz.com" -> "ok" });
"delete_from_section"(section_name,$key)
Deletes the key/value pair from the section.
$foo->delete_from_section("_hostgroup", "ns1.baz.com");
"error"
Should any of the functions return an error (-1), this function can be used to retrieve a more elaborate error message and to reset the
internal error state.
perl v5.14.2 2012-04-27 Mon::Protocol(3pm)