the script shows that it will create up to 2 files.... can we make it more flexible? i mean, it there is additional file to be created........ maybe up to 100 files. where can i put the foreach?
I have a binary file a particular format.
It contains the Length Bytes and the Type bytes i.e the first four bytes if the file indicate the length of the Type which is to follow.
for eg, if the int value of the first four bytes is 80, then it means that the length of the following "Type" is 80.... (2 Replies)
I have a big xml file with little formatting in it. It contains over 600 messages that I need to break each message out in its own separate file.
The xml file looks in the middle of it something like this:
</Title></Msg><Msg><Opener> Hello how
are you?<Title> Some says hello</Title><Body>... (3 Replies)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
I have always struggled when parsing a file vertically vs. by line horizontally. Can't seem to get my head around the concept. Here again I need to convert vertical output to horizontal output.
original output
root@acuransx:bpplsched 2000-STAND3 -v -M acuransx -l
<2>bpplsched: INITIATING:... (4 Replies)
I trying to get only the highest version of the file names from an file which has list of file names.
EX:
CATEGORYDISPLAY JSP.A-SRC_BLD;2.4
CATEGORYDISPLAY JSP.A-SRC_BLD;2.5
CATEGORYDISPLAY JSP.A-SRC_BLD;2.1
CATEGORYDISPLAY JSP.A-SRC_BLD;2.2
The Script should display only the highest... (7 Replies)
Hi All,
I have an input file something like this:
Line1
Line2
....
LineN
Identifier
( Field1a, Field1b;
Field2a, Field1b;
Field3a, Field1b;
.....
)
LineN+1
LineN+2
etc..
I basically need Field1a, Field2a, Field3a.... from the above file (6 Replies)
All,
Can somebody provide me with some sed expertise on how to parse the
following line.
27-MAR-2011 10:28:01 * (CONNECT_DATA=(SID=dmart)(CID=(PROGRAM=sqlplus)(HOST=mtasnprod1)(USER=mtasnord))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.197.7.47)(PORT=54881)) * establish * dmart * 0
I would like... (3 Replies)
Hi all,
Could anyone help me out?
My input file is like:
M1SYSNPENGGQINDNINYSE21PTMLPENLSLSNYDMDSFLGQFPSDNNMQLPHSTYEQHLQGEQQNPTNPNYFPPEFDEN2VDW1QE2
output is:
M1
M1SYSNPENGGQINDNINYSE2
M1SYSNPENGGQINDNINYSE21
SYSNPENGGQINDNINYSE2
SYSNPENGGQINDNINYSE21 ... (2 Replies)
Can some body show me a sed command to remove everyhing upto a '/' and
leave the rest of the line.
cat data.out
This is the directory /tmp/xxx/yy.ksh
I only want to get the fullpath name
/tmp/xxx.yy.ksh
Thanks in advance to all who answer. (3 Replies)
Discussion started by: BeefStu
3 Replies
LEARN ABOUT LINUX
head
HEAD(1) User Commands HEAD(1)NAME
head - output the first part of files
SYNOPSIS
head [OPTION]... [FILE]...
DESCRIPTION
Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With
no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-c, --bytes=[-]K
print the first K bytes of each file; with the leading `-', print all but the last K bytes of each file
-n, --lines=[-]K
print the first K lines instead of the first 10; with the leading `-', print all but the last K lines of each file
-q, --quiet, --silent
never print headers giving file names
-v, --verbose
always print headers giving file names
--help display this help and exit
--version
output version information and exit
K may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P,
E, Z, Y.
AUTHOR
Written by David MacKenzie and Jim Meyering.
REPORTING BUGS
Report head bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report head translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for head is maintained as a Texinfo manual. If the info and head programs are properly installed at your site, the
command
info coreutils 'head invocation'
should give you access to the complete manual.
GNU coreutils 8.5 February 2011 HEAD(1)