I need to extract the character before the last "|" in the following lines, which are 'N' and 'U'. The last "|" shouldn't be extracted. Also the no.s of "|" may vary in a line, but I need only the character before the last one.
... (1 Reply)
Problem: I have a lot of files, the files first line should always have 4 spaces before any text. Occasionally some of the files will miss the leading spaces and it's a problem. This is only in the first line.
So if there are 4 spaces then text, do nothing. If there are not 4 spaces, add 4... (2 Replies)
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)
Hi,
this might be a basic question...
why is that wc -c counts 1 more per line than what is there.
for example,
> cat dum1.txt
123
12
> wc -c dum1.txt
7 dum1.txt
Thanks,
Sameer. (4 Replies)
Hi all,
I've searched for this but couldn't seem to find the answer I'm looking for. I have a text file that looks like this:
sgea0447 Earnings followed the same path. earnings followed the same path
sgea0448 Economic growth slowed further. economic growth slowed further... (13 Replies)
hey ,
i want to check if the char "#" exist at the end of every line of txt file
and if it dosent then add it for example:
the cat jumped on my mom #
cars can run on water#
i cant get a date
blue
yellow#
will be:
the cat went back home#
cars can run on water#
i cant get a... (2 Replies)
I'm trying to add a '1' before a line that has the word "C_ID"
s/.*C_ID.*/&\n1/
The above code did what I need, but the '1' is added after the C_ID word :( Help please. (5 Replies)
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
Before:-
File Name:- File1.dat
102 121340560... (10 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)
Need to add a numeric & special char to end of the first line
Existing file:
12-11-16|11 2016 Jan 12:34:55|03:55|
13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55|
14-10-16|19 2016 Jan 12:34:55|03:55|13-11-16|11 2016 Jan 12:34:55|04:55|
15-10-16|18 2016 Jan... (11 Replies)
Discussion started by: Joselouis
11 Replies
LEARN ABOUT LINUX
unroff
UNROFF(1) General Commands Manual UNROFF(1)NAME
unroff - convert troff documents to plain text
SYNTAX
unroff [ -E ] [ -J ] [ -8 ] [ -mxx ] [ file ... ]
DESCRIPTION
unroff processes documents written to be formatted with troff (or nroff, or any of the other *roff variants) and converts them to plain
text. This is similar to what deroff does, but the result is sometimes better than deroff output.
Optional flags may be given to modify the operation of unroff, as follows:
-E Echo input tokens as they are read. Useful mainly for debugging.
-J Join output lines that would be part of a single paragraph so they form a single output line. This is useful if you plan to move
the resulting output into a document formatter that treats paragraphs as a single line. The default is to do line wrapping accord-
ing to the line length specified in the input document.
-8 Write 8-bit ISO Latin-1 (ISO 8859-1) characters. This option may be useful for producing output intended to be viewed on devices
capable of 8-bit character display. Without this option, 8-bit Latin-1 characters will generall appear in the output as
``[[name]]'' where ``name'' is the troffcvt internal name for the character, e.g., ``[[Aacute]]''. For some of these characters, an
ASCII approximation will be used if something reasonably close is available.
-mxx Specify macro package, usually -man, -me, -mm, or -ms.
DIAGNOSTICS
line length clipped to nnn chars. A very long line length was requested, so long that it would likely result in output line assembly buf-
fer overflow. The length is clipped to prevent this.
output buffer capacity exceeded. This means some line is so long that it couldn't be collected in the output line assembly buffer. Most
likely this signals a bug in tc2text, since the length is supposed to be kept within reasonable bounds (see previous paragraph).
SEE ALSO troffcvt(1), tc2text(1)WHO-TO-BLAME
Paul DuBois, dubois@primate.wisc.edu.
BUGS
unroff doesn't do so well with tables, particularly tables with multiple-line cells. Table centering isn't handled.
UNROFF(1)