I have my data something like this
SERIAL FIRSTOCCURRENCE
NETPROTOCOL
1947430693 07/01/2009 05:16:40
FR
SERIAL FIRSTOCCURRENCE
NETPROTOCOL
1947430746 07/01/2009 05:18:05
FR
I want the output as follows.... (1 Reply)
Hi
I m having ifconfig -a o/p like
sbanlab1:ksh# ifconfig -a | egrep "flags|inet" | awk -F' ' '{print $1,$2}'
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
bge0:... (1 Reply)
Hello,
Need help substituting a particular word in a file having a single line but no newline character at the end.
I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line.
$ cat hlq_detail
/outputs/alvan23/PDFs/bills
$ cat... (5 Replies)
I have several hundreds of tiny files which need to be concatenated into one single line and all those in a single file. Some files have several blank lines. Tried to use this script but failed on it.
awk 'END { print r } r && !/^/ { print FILENAME, r; r = "" }{ r = r ? r $0 : $0 }' *.txt... (8 Replies)
I have a file, I need to remove the first character of each line, but only if it's a comma. I don't want to delete any other commas in each line.
Trying cat or sed but I really don't know them very well, would love some help.
This removes the first comma, but it removes the first comma no... (6 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi Gurus,
I need separate one file which is one huge line to mutiple line.
file like
abcd # bcd # def # fge # ged
I want to get
abcd
bcd
def
fge
ged
Thanks in advance (4 Replies)
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
I wish to generate output of two commands in the same line separated by a single white-space.
Below is my command and output in the same line.
ls -ltr fname1.out | awk '{$2=$4=$5=x; print}' | tr '\n' '\t' | tr -s ' '; cksum<fname1.out | cut -d' ' -f1
Output:
-rw-r--r--. root Aug 26 16:57... (6 Replies)
Discussion started by: mohtashims
6 Replies
LEARN ABOUT DEBIAN
unblock_dlg
UNBLOCK_DLG(1) General Commands Manual UNBLOCK_DLG(1)NAME
unblock_dlg - Insert linefeeds into an optional-format Digital Line Graph (DLG) file
SYNOPSIS
unblock_dlg [-L]
DESCRIPTION
The drawmap program processes USGS optional-format Digital Line Graph (DLG) files (along with other types of files) to produce customized
maps. Drawmap is able to read these files in their native format. However, since the files usually don't contain any linefeeds, they are
difficult for a human to read. Unblock_dlg filters a DLG file and inserts linefeeds for human readability. It takes input from the stan-
dard input and writes to the standard output. The input data must be in uncompressed form, not in gzip-compressed form. Also, unblock_dlg
does not work with SDTS DLG files.
Unblock_dlg normally takes no options, but, if you use the "-L" option, the program will print out some license information and exit.
Some DLG files already have embedded linefeeds. Unblock_dlg makes a feeble attempt to detect these files and abort. If the detection
fails, the results are likely to be garbled, so it is wise to check the format of each file first. The drawmap program, with the "-i"
option, will attempt to tell you whether a file contains linefeeds or not.
The intended use of unblock_dlg is simply to let you conveniently examine the files to see what is in them. However, if you are in the
mood for adventure, or if you need to repair a defective file, you can use unblock_dlg to make the file easy to edit, then you can edit the
file as desired. Drawmap can still process the files after linefeeds are inserted, but will become confused if any line (including the
linefeed) is more than 80 characters long. Drawmap may also become confused if you make any significant changes to the format of the file.
You can use this capability to remove selected items from DLG files, when those items cause problems. You may even be able to repair
faulty data. However, you need to be familiar with the content and structure of DLG files in order to do this effectively. You also need
to remember that drawmap depends on DLG files having a predictable structure, and it won't properly parse files that violate this pre-
dictability. Do this sort of thing only if you know what you are doing, or if you have a lot of free time on your hands.
It should be noted that you can obtain a similar effect by using the command recommended by the USGS:
dd if=inputfilename of=outputfilename ibs=8000 cbs=80 conv=unblock
I prefer the unblock_dlg command because it simply replaces the last byte of each record with a linefeed. This lets me easily tell how
long the original records were. The effect of unblock_dlg or dd can be undone by typing:
dd if=inputfilename of=outputfilename ibs=8000 cbs=80 conv=block
You may come across files that have a linefeed in the 81st byte. Drawmap doesn't like these, both because it can't tell (within the space
of the first 80-byte record) whether the file contains linefeeds or not, and because the records exceed the maximum record length of 80
bytes. You may be able to repair such files by blocking them with the above dd command.
SEE ALSO unblock_dem(1), drawmap(1)
Jul 24, 2001 UNBLOCK_DLG(1)