09-25-2009
That there is no helping here in the forum is not true and can easily be checked by other threads in here (if you meant this one). Just check - there are other threads but your's that usually get plenty of answers. So really no reason to be insulted.
Also you can't totally deny that the request to read a random line from a text file does sound like homework.
If I were sure it was homework I had closed it already. Mods are only humans too and humans can be wrong. So get over it
And no, I don't start checking people's IPs to get a clue where they work.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Lets say I have a file abc.txt and it has about 35 million rows. I would like to take a sample of 100 random rows from that file for my testing purpose and write it to a file say test.txt.
How do I do this operation?
Thanks,
Sashank (9 Replies)
Discussion started by: sashankkrk
9 Replies
2. Shell Programming and Scripting
Hi!
I need to read in the first line from a text file (which will only ever have one line in it), so I tried this....
while read line
do
echo $line
done < $file
But this wasn't returning anything. So I tired a different file, which had multiple lines of text in it, and it returned... (2 Replies)
Discussion started by: davewg
2 Replies
3. Shell Programming and Scripting
Hello,
I have got a script that reads a text file, and have got three problems that I an struggling with.
1. The script does not read the last line in the text file
2. within the second 'elif' within the script I included a 'break' - the script runs successfully (except for the first... (2 Replies)
Discussion started by: jermaine4ever
2 Replies
4. Shell Programming and Scripting
Hi everyone,
I am writing a BASH shell script that I will use to process data files. I have a text file that contains the names of the files to be processed, for example:
cat filenames.txt
file1
file2
file3
file4
file5
What I would like to do is set up a FOR loop within my script... (2 Replies)
Discussion started by: msb65
2 Replies
5. Shell Programming and Scripting
Hi ,
I am trying to write an shell, which reads a text file (from a location) having a list of numbers of strictly 5 digits only ex: 33144
Now my script will check :
1) that each entry is only 5 digits & numeric only, no alphabets, & its not empty.
2)then it executes a shell script called... (8 Replies)
Discussion started by: new_to_shell
8 Replies
6. Shell Programming and Scripting
I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting?
file1.html
<head>
<url>http://www.google.com</url>
</head>
file2.html
<head>... (6 Replies)
Discussion started by: vel4ever
6 Replies
7. Shell Programming and Scripting
Hi ppl.
I want to read the first word of each line of a text file to a variable in a bash script.
Can anyone help pls, thanks. (6 Replies)
Discussion started by: cannot
6 Replies
8. Programming
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)
Discussion started by: khaled79
1 Replies
9. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
10. Shell Programming and Scripting
i have a text file as belows, it includes 2 columns, 1st is the column name, 2nd is the file_name
data_file.txt
column_name file_name
col1 file1
col2 file2
col3 file1
col4 file1
col5 file2
now, i would like to... (4 Replies)
Discussion started by: tester111
4 Replies
LEARN ABOUT REDHAT
gftype
GFTYPE(1) General Commands Manual GFTYPE(1)
NAME
gftype - translate a generic font file for humans to read
SYNOPSIS
gftype [ -i ] [ -m ] gf_file_name [ output_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 gftype program translates a gf (generic font) file output by, for example, mf(1), to a file that humans can read. It also serves as a
gf file-validating program (i.e., if gftype can read it, it's correct) and as an example of a gf-reading program for other software that
wants to read gf files.
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. If no output_file_name is specified, the output goes to stdout.
OPTIONS
The output file includes bitmap images of the characters, if -i is given on the command line, and a symbolic listing of the gf commands, if
-m is specified.
ENVIRONMENT
gftype 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 ALSO
dvitype(1), pktype(1).
Donald E. Knuth et al., Metafontware.
AUTHORS
David Fuchs and Don Knuth wrote the program. It was published as part of the Metafontware technical report, available from the TeX Users
Group. Paul Richards originally ported it to Unix.
Web2C 7.3.1 14 December 1993 GFTYPE(1)