Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
hello all
i request you to give the solution for the following problem..
I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print
g
go
goo
goog
googl
google
like this Using unix Shell scripting...
without using... (1 Reply)
Hi Experts,
I have called file1.txt contains below
CREATE TABLE "IHUBDEV2"."TLM_BREAK_RULES"
( "OID" VARCHAR2(32) NOT NULL ENABLE,
"TLM_PAY_CLASS_OID" VARCHAR2(32) NOT NULL ENABLE,
"PUNCHED_BREAKS" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
"NORMAL_BREAKS"... (3 Replies)
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Hi,
Maybe this iscorrect forum for my question...
I should read one character at a fixed position from each line of the file. So how ??? should be substituted in the code below:
while read line ; do
single_char=`???`
echo "$single_char"
done < $input_file
OK...I did get an... (0 Replies)
Hi,
I want to read the file from nth line (where n is an integer) to until I encounter @ char.
Can any one please help me how to do this?
Thanks. (3 Replies)
performing this code to read from file and print each character in separate line
works well with ASCII encoded text
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int... (1 Reply)
Hi friend,
I have one file , and i want to read that file character by character.
I need this script in ksh.
while using read option with -n1 am getting error.
while read -n1 c read has bad option
And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies
10. Post Here to Contact Site Administrators and Moderators
I have Index Line and I tried to get the 9th character from the file and to check the character is "|" or not.
Shell Scripting.
Sample Index file.
"91799489|K8E|188.004.A.917994892.1099R.c.01.pdf|2013|10/15/2014|002|B|C|C"... (3 Replies)
Discussion started by: pavand
3 Replies
LEARN ABOUT DEBIAN
gftodvi
GFTODVI(1) General Commands Manual GFTODVI(1)NAME
gftodvi - make proof sheets from generic font files
SYNOPSIS
gftodvi [-overflow-label-offset=real] [-verbose] gf_file_name
DESCRIPTION
This manual page is not meant to be exhaustive. The complete documentation for this version of TeX can be found in the info file or manual
Web2C: A TeX implementation.
The gftodvi program converts a generic font (gf) file output by, for example, mf(1), to a device independent (DVI) file (that can then be
typeset using the same software that has already been written for TeX). The characters in the gf file will appear one per page, with
labels, titles, and annotations as specified in Appendix H (Hardcopy Proofs) of The Metafontbook.
gftodvi uses other fonts in addition to the main gf file. A `gray' font is used to typeset the pixels that actually make up the character.
(We wouldn't want all the pixels to be simply black, since then labels, key points, and other information would be lost.) A `title' font
is used for the information at the top of the page. A `label' font is used for the labels on key points of the figure. A `slant' font is
used to typeset diagonal lines, which otherwise have to be simulated using horizontal and vertical rules. The default gray, title, and
label fonts are gray, cmr8, and cmtt10, respectively; there is no default slant font.
To change the default fonts, you can give special commands in your Metafont source file, or you can change the fonts online. An online dia-
log ensues if you end the gf_file_name with a `/'. For example,
gftodvi cmr10.300gf/
Special font substitution: grayfont black
OK; any more? grayfontarea /home/art/don/
OK; any more? slantfont /home/fonts/slantimagen6
OK; any more? <RET>
will use /home/art/don/black as the `gray' font and /home/fonts/slantimagen6 as the `slant' font (this name indicates a font for lines with
slope 1/6 at the resolution of an Imagen printer).
The gf_file_name on the command line must be complete. Because the resolution is part of the extension, it would not make sense to append
a default extension as is done with TeX or DVI-reading software. The output file name uses the same root as the gf file, with the .dvi
extension added. For example, the input file cmr10.2602gf would become cmr10.dvi.
OPTIONS
The argument to -overflow-label-offset specifies the distance from the right edge of the character bounding box at which the overflow equa-
tions (if any) are typeset. The value is given in TeX points. The default is a little over two inches.
Without the -verbose option, gftodvi operates silently. With it, a banner and progress report are printed on stdout.
ENVIRONMENT
gftodvi looks for gf_file_name using the environment variable GFFONTS. If that is not set, it uses the variable TEXFONTS. If that is not
set, it uses the system default.
See tex(1) for the details of the searching.
FILES
{gray.tfm,...}
The default fonts.
{gray.mf,...}
The Metafont sources.
SEE ALSO tex(1), mf(1).
Donald E. Knuth, The Metafontbook (Volume C of Computers and Typesetting), Addison-Wesley, 1986, ISBN 0-201-13445-4.
Donald E. Knuth et al., Metafontware.
AUTHORS
Donald E. Knuth wrote the program. It was published as part of the Metafontware technical report, available from the TeX Users Group. Paul
Richards ported it to Unix.
Web2C 2012 20 April 2007 GFTODVI(1)