02-29-2008
text processing ( sed/awk)
hi..
I have a file having record on in 1 line....
I want every 400 characters in a new line...
means in 1st line 1-400
in 2nd line - 401-800 etc
pl help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have what is probably a simple task in text manipulation, but I just can't wrap my brain around it.
I have a text file that looks something like the following. Note that some have middle initials in the first field and some don't.
john.r.smith:john.smith@yahoo.com... (4 Replies)
Discussion started by: manouche
4 Replies
2. Shell Programming and Scripting
As the title states, my issue involves preparing LaTeX documents for processing with latex2html.
Within my LaTeX docs I have used a package which allows me to cleanly display source code listings. However the package is not supported by latex2html which, when processed, does not display the... (3 Replies)
Discussion started by: oski
3 Replies
3. Shell Programming and Scripting
I need a script to process a huge single line text file:
The sample of the text is:
"forward_inline_item": "Inline", "options_region_Australia": "Australia", "server_event_err_msg": "There was an error attempting to save", "Token": "Yes", "family": "Family","pwd_login_tab": "Enter Your... (1 Reply)
Discussion started by: hmsadiq
1 Replies
4. Shell Programming and Scripting
Hi there,
I'm trying to extract automatically opening hours from a website.
The page displaying the schedules is
http://www.natureetdecouvertes.com/pages/gener/view_FO_STORE_corgen.asp?mag_cod=xxx
with xxx going from 101 to 174
I managed to get the following output :
le lundi de 10.30 à... (4 Replies)
Discussion started by: chebarbudo
4 Replies
5. Shell Programming and Scripting
Hi Very much appreciate if somebody could give me a clue ..
I undestand that it could be done with awk but have a limited experience.
I have the following text in the file
1 909 YES NO
2 500 No NO
.
...
1 ... (8 Replies)
Discussion started by: zam
8 Replies
6. Programming
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies
7. Shell Programming and Scripting
I dispose of two tab-delimited files (the first column is the primary key):
File 1 (there are multiple rows sharing the same key, I cannot merge them)
A 28,29,30,31
A 17,18,19
B 11,13,14,15
B 8,9File 2 (there is one only row beginning with a given key)
A 2,8,18,30,31
B ... (3 Replies)
Discussion started by: dovah
3 Replies
8. Shell Programming and Scripting
P { margin-bottom: 0.25cm; line-height: 120%; }CODE.cjk { font-family: "WenQuanYi Micro Hei",monospace; }CODE.ctl { font-family: "Lohit Hindi",monospace; }A:link { } I'm trying to build an awk statement to print from a file (file1):
A 1,2,3 *
A 4,5,6 **
B 1
... (4 Replies)
Discussion started by: dovah
4 Replies
9. Shell Programming and Scripting
Hi guys,
I worked for almost a half-day for the replacement of some text automatically with script. But no success.
The problem is I have hundred of files, which need to be replaced with some new text. It's a painful work to work manually and it's so easy to do it wrong.
For example,
I... (2 Replies)
Discussion started by: liuzhencc
2 Replies
10. Shell Programming and Scripting
Hi,my file is in this format
",
\"symbol\": \"Rbm38\"
} ]"
I want to convert it to a more user readable format
_id pubmed text symbol
67196 18667844 Overexpression of UBE2T in NIH3T3 cells significantly promoted colony formation in mouse cell cultures Ube2t
56190 21764855 ... (3 Replies)
Discussion started by: biofreek
3 Replies
LEARN ABOUT REDHAT
restorefont
restorefont(1) Svgalib User Manual restorefont(1)
NAME
restorefont - save or restore the SVGA font for textmode.
SYNOPSIS
restorefont {-r|-w} filename
DESCRIPTION
The font used by SVGA when in textmode is written to or restored from filename using the vga_gettextfont(3) and vga_puttextfont(3) func-
tions.
FILE FORMAT
The VGA font file filename has the following format:
Offset:
0 - 31 Character 0
... ...
8164 - 8195 Character 255
Each row of a character bitmap is stored as a byte (8 pixels). The space that is left from the 32-byte buffer for each character is
ignored, e.g. a 16 line font uses only offsets 0 - 15 of each character.
Linux textmode screen resolutions:
80x25 16 line font 400 scanlines
80x28 14 line font 400 scanlines
80x50 8 line font 400 scanlines
The font sizes and resolutions of extended textmodes depend on the video card type and BIOS:
132x25 14 line font 350 scanlines (ugly)
132x25 16 line font 400 scanlines
132x43 8 line font 350 scanlines (use fix132x43 to fix/improve)
132x50 8 line font 400 scanlines
Using a font that has less lines per character than the textmode works, but the characters are smaller. Using a font that is bigger than
the textmode font results in the bottom part of characters being cut off.
The svgalib distribution contains sample fonts with 8, 14 and 16 line characters in the files utils/font8, utils/font14, and utils/font16.
The convfont (1) program can be used to convert fonts straightforwardly stored character-after-character (i.e. each character only uses
8/14/whatever bytes), to the 32-byte per character format that restorefont requires.
The purpose of this program is usually to recover from a crashed console due to an svgalib, Xfree or other program bug. First save the
state of the SVGA card when on a text console. After the crash restore this state. The savetextmode(1) and textmode(1) script makes this
procedure very easy.
The national/fontpak packages, which include kernel patches, allow different textmode fonts to be used in different virtual consoles. These
have been superseded by the kbd package (in the kernel since ages). See the setfont(8) utility of the kbd package as a starting point.
Recent kernels support up to 2 fonts with 512 chars each. Recent versions of svgalib take this into account and extend the size of the
datafile accordingly.
OPTIONS
-w filename
write the font to the file filename.
-r filename
restore the font from the file filename.
SEE ALSO
svgalib(7), vgagl(7), libvga.config(5), setfont(8), vga_gettextfont(3), vga_puttextfont(3), dumpreg(1), convfont(1), fix132x43(1), restore-
textmode(1), restorepalette(1), runx(1), savetextmode(1), setmclk(1), textmode(1).
AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced utility as well as of the
original documentation is unknown.
It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>.
Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections
to this first version of the svgalib manual.
Svgalib (>= 1.2.11) 2 Aug 1997 restorefont(1)