05-20-2009
how to get the blank line number of a file?
I want to get the blank line number of a file.
example:
9000|9000|WW|1|1|SL|472|472|LC|2272|1072|MTY|niceDay
9000|9000|WW|1|1|SL|470|470|MC|1270|1172|MPVT|nice
9000|9000|WW|1|1|SL|472|472|LC|1072|1672|MBD|Sonice
9000|9000|WW|1|1|SL|473|473|LF|1173|1173|MTY|nice666
I want to get the result like this:
2
4
6
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies
2. Shell Programming and Scripting
i have a file called Cleaner1.log . This files have some blank lines also.My requirement is that it should ignore the blank lines and give me the lines that contain some data.
I m using this logic in a script:
below the contents of file :
Maximum Time Taken for Processing(Failed) RR... (4 Replies)
Discussion started by: ali560045
4 Replies
3. Shell Programming and Scripting
I have a number of files (arranged in directories) which have last line blank,
I am trying to synchronize my code with other env and due to this blank lines, all files error out as different although only difference is that of balnk line at end of file.
Is there a way I can recursively... (2 Replies)
Discussion started by: ruchimca
2 Replies
4. Shell Programming and Scripting
Hi
I nned cmd to which will help me to replace a line in file with blank line
e.g.
file1
a
b
c
d
e
after running cmd I shud get
file1
b
c
d
e (5 Replies)
Discussion started by: tarunn.dubeyy
5 Replies
5. Shell Programming and Scripting
Hi Guys,
I have a file in which each set of records are separated by two blank line. I want to replace it with a single blank line.
Can you guys help me out?
Regards,
Magesh (9 Replies)
Discussion started by: mac4rfree
9 Replies
6. Shell Programming and Scripting
I have a file with data as below :
Heading 1
-------------
Heading 1 data1
Heading 1 data2
Heading 1 data3
Heading 1 data4
Heading 2
-------------
Heading 2 data1
Heading 2 data2
Heading 2 data3
Heading 2 data4
Heading 3
-------------
Heading 3 data1
Heading 3 data2
Heading 3... (2 Replies)
Discussion started by: yoursdivu
2 Replies
7. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
8. Shell Programming and Scripting
hlow all i need help
how can i replace blank number with awk
input.txt
300::|355264313178490
301::|358814003239510
302::|358316038113400
303::|357954002633660
304::|354072040694090
305::|356956015214190
306::|352943020525180
307::|359574033836610
308::|381810990023580
so will be like... (4 Replies)
Discussion started by: zvtral
4 Replies
9. UNIX for Dummies Questions & Answers
Hello All ,
I have a file which needs to split based on the blank lines
Name ABC
Address London
Age 32
(4 blank new line)
Name DEF
Address London
Age 30
(4 blank new line)
Name DEF
Address London (8 Replies)
Discussion started by: Pratik4891
8 Replies
10. Shell Programming and Scripting
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
TWA(4) BSD Kernel Interfaces Manual TWA(4)
NAME
twa -- 3ware 9000/9500/9550/9650 series SATA RAID controllers driver
SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file:
device scbus
device twa
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
twa_load="YES"
DESCRIPTION
The twa driver provides support for AMCC's 3ware 9000/9500/9550/9650 series SATA controllers.
These controllers are available in 4, 8, 12 or 16-port configurations, and support the following RAID levels: 0, 1, 10, 5, 50. The device
nodes for the controllers are of the form /dev/twaX, where X is the controller number. The driver is implemented as a SCSI SIM under CAM,
and, as such, the logical units that it controls are accessible via the device nodes, /dev/daY, where Y is the logical unit number.
HARDWARE
The twa driver supports the following SATA RAID controllers:
o AMCC's 3ware 9500S-4LP
o AMCC's 3ware 9500S-8
o AMCC's 3ware 9500S-8MI
o AMCC's 3ware 9500S-12
o AMCC's 3ware 9500S-12MI
o AMCC's 3ware 9500SX-4LP
o AMCC's 3ware 9500SX-8LP
o AMCC's 3ware 9500SX-12
o AMCC's 3ware 9500SX-12MI
o AMCC's 3ware 9500SX-16ML
o AMCC's 3ware 9550SX-4LP
o AMCC's 3ware 9550SX-8LP
o AMCC's 3ware 9550SX-12
o AMCC's 3ware 9550SX-12MI
o AMCC's 3ware 9550SX-16ML
o AMCC's 3ware 9650SE-2LP
o AMCC's 3ware 9650SE-4LPML
o AMCC's 3ware 9650SE-8LPML
o AMCC's 3ware 9650SE-12ML
o AMCC's 3ware 9650SE-16ML
o AMCC's 3ware 9650SE-24M8
DIAGNOSTICS
Whenever the driver encounters a command failure, it prints out an error code in the format: "ERROR: (<error source>: <error code>):", fol-
lowed by a text description of the error. There are other error messages and warnings that the driver prints out, depending on the kinds of
errors that it encounters. If the driver is compiled with TWA_DEBUG defined, it prints out a whole bunch of debug messages, the quantity of
which varies depending on the value assigned to TWA_DEBUG (0 to 10).
AUTHORS
The twa driver and manpage were written by Vinod Kashyap <vkashyap@FreeBSD.org>.
BSD
May 9, 2007 BSD