Sponsored Content
Full Discussion: ksh file handling
Top Forums Shell Programming and Scripting ksh file handling Post 302615129 by CarloM on Thursday 29th of March 2012 07:37:50 AM
Old 03-29-2012
I know - it's just an example. The actual command used isn't relevant to the question I asked - I could equally have used any other command sequence that both reads and writes.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KSH File Handling

Hi Im writing a small script right now which reads all of the files in a directory and displays there name. However I dont want to use the ls command. Is there any way of reading the names of the files and printing them to the screen? (2 Replies)
Discussion started by: madtim
2 Replies

2. Programming

File Handling in C

Hi all, I have a problem in handling files through C. here is the problem im having: i will query the database (for instance consider employees table ) for empno,ename,job,salary fields.The query returns me some 100 of rows. now i need to place them in a file in row wise pattern as they... (3 Replies)
Discussion started by: trinath
3 Replies

3. Shell Programming and Scripting

file handling with ksh scripting

how can i write content of a variable to a file? how can i read standard output into a variable? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

4. UNIX for Advanced & Expert Users

File Handling

Hi, I have a log file which runs into 3 to 5 GB. We store this typically for 6 months. When a new month starts we move the previous month into a 9 month back up log (file.9m) and delete the last month of the 9 month back up. Iam using awk to find the data and cat to join the files like... (3 Replies)
Discussion started by: baanprog
3 Replies

5. Shell Programming and Scripting

Handling values with space while passing commandline argument from wrapper script in KSH

Hi there, I have a wapper script which passes the argument from command prompt to inner script.. It works fine as long as the argument containing single word. But when value contains multiple word with space, not working as expected. I tried my best, couldn't find the reason. Gurus, pls.... (2 Replies)
Discussion started by: kans
2 Replies

6. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

7. UNIX for Advanced & Expert Users

File handling

my input for a script is another csv file but in that file say 7 lines are there ... how can i get line by line to that input for example : >cat link.csv www.yahoo.com,yahoo www.google.com,google www.unix.com,unix another file in that file i need to ping the above links ... (2 Replies)
Discussion started by: ponmuthu
2 Replies

8. UNIX for Dummies Questions & Answers

File Handling

Hi Team, I am trying to cut a large file into multiple files. It has Header 50,050 records Trailer ------------------------------------------- I need to cut the files into multiple files of 1000 records and should have the same header and trailer as the original files. ... (4 Replies)
Discussion started by: Gurkamal83
4 Replies

9. UNIX for Dummies Questions & Answers

File handling

I have a file 1 298167 298168 1093209 1093210 1422663 I want to write a code where in I want to read contents of above file like first read is 1 second read is 298167 Substract second read from first and if this is greater than or less than 99,999. Similarly I want to traverse thru... (3 Replies)
Discussion started by: Guru148
3 Replies

10. Shell Programming and Scripting

File handling

Hi All, I need to extract the data from the text file. The data of the text file is shown below #L 0.000017 4.329939 0.000017 4.716267 r7.9 P 1 1;Net=IN32 The extracted data should be IN32. Could anyone help to script in c shell.? (4 Replies)
Discussion started by: gopishrine
4 Replies
pstotext(1)						      General Commands Manual						       pstotext(1)

NAME
pstotext - extract ASCII text from a PostScript or PDF file SYNTAX
pstotext [option|pathname]... where option includes: -cork -landscape -landscapeOther -portrait - -output file -gs command -debug -bboxes DESCRIPTION
pstotext reads one or more PostScript or PDF files, and writes to standard output a representation of the plain text that would be dis- played if the PostScript file were printed. As is described in the DETAILS section below, this representation is only an approximation. Nevertheless, it is often useful for information retrieval (e.g., running grep(1) or building a full-text index) or to recover the text from a PostScript file whose source you have lost. pstotext calls Ghostscript, and requires Aladdin Ghostscript version 3.51 or newer. Ghostscript must be invokable on the current search path as gs. Alternatively, you can use the -gs option to specify the command (pathname and options) to run Ghostscript. For example, on Windows you might use -gs "c:gsgswin32c.exe -Ic:gs;c:gsfonts". pstotext reads and processes its command line from left to right, ignoring the case of options. When it encounters a pathname, it opens the file and expects to find a PostScript job or PDF document to process. The option - means to read and process a PostScript job from standard input. If no - or pathname arguments are encountered, pstotext reads a PostScript job from standard input. (PDF documents require random access, hence cannot be read from standard input.) You can use the -output option to specify an output file (remember to invoke it before the input file); otherwise pstotext writes to standard output. The option -cork is only relevant for PostScript files produced by dvips from TeX or LaTeX documents; it tells pstotext to use the Cork encoding (known as T1 in LaTeX) rather than the old TeX text encoding (known as OT1 in LaTeX). Unfortunately files produced by dvips don't distinguish which font encodings were used. The options -landscape and -landscapeOther should be used for documents that must be rotated 90 degrees clockwise or counterclockwise, respectively, in order to be readable. The options -debug and -bboxes are mostly of use for the maintainers of pstotext. -debug shows Ghostscript output and error messages. -bboxes outputs one word per line with bounding box information. DETAILS
pstotext does its work by telling Ghostscript to load a PostScript library that causes it to write to its standard output information about each string rendered by a PostScript job or PDF document. This information includes the characters of the string, and enough additional information to approximate the string's bounding rectangle. pstotext post-processes this information and outputs a sequence of words delimited by space, newline, and formfeed. pstotext outputs words in the same sequence as they are rendered by the document. This usually, but not always, follows the order that a human would read the words on a page. Within this sequence, words are separated by either space or newline depending on whether or not they fall on the same line. Each page is terminated with a formfeed. If you use the incorrect option from the set {-portrait, -landscape, -landscapeOther}, pstotext is likely to substitute newline for space. A PostScript job or PDF document often renders one word as several strings in order to get correct spacing between particular pairs of characters. pstotext does its best to assemble these strings back into words, using a simple heuristic: strings separated by a distance of less than 0.3 times the minimum of the average character widths in the two strings are considered to be part of the same word. Note that this typically causes leading and trailing punctuation characters to be included with a word. The PostScript language provides a flexible encoding scheme by which character codes in strings select specific characters (symbols), so a PostScript job is free to use any character code. On the other hand, pstotext always translates to the ISO 8859-1 (Latin-1) character code, which is an extension to ASCII covering most of the Western European languages. When a character isn't present in ISO 8859-1, psto- text uses a sequence of characters, e.g., "---" for em dash or "A226" for Abreve. pstotext can be fooled by a font whose Encoding vector doesn't follow Adobe's conventions, but it contains heuristics allowing it to handle a wide variety of misbehaving fonts. (pstotext no longer translates hyphen (255) to minus (55).) AUTHOR
Andrew Birrell (PostScript libraries), Paul McJones (application), Russell Lang (Windows and OS/2 adaptation), and Hunter Goatley (VMS adaptation). SEE ALSO
pstotext incorporates technology originally developed for the Virtual Paper project at SRC; see http://www.research.digital.com/SRC/virtu- alpaper/. As mentioned above, pstotext invokes Ghostscript. See gs(1) or http://www.cs.wisc.edu/~ghost/. COPYRIGHT
Copyright 1995-8 Digital Equipment Corporation. Distributed only by permission. See file /usr/share/doc/pstotext/copyright for details. Last modified on Sat Feb 5 21:00:00 AEST 2000 by rjl modified on Fri Jun 5 14:02:37 PDT 1998 by mcjones modified on Wed Jun 7 17:47:56 PDT 1995 by birrell This file was generated automatically by mtex software; see the mtex home page at http://www.research.digital.com/SRC/mtex/. pstotext(1)
All times are GMT -4. The time now is 11:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy