Sponsored Content
Top Forums Shell Programming and Scripting How to convert a .log file into .txt file under unix?? Post 302322395 by ks_reddy on Wednesday 3rd of June 2009 03:16:30 PM
Old 06-03-2009
How to convert a .log file into .txt file under unix??

Hi Friends,

I have a .log file generated from a tool(Windows PC) which can be opened using a notepad, but when I tried to view the file in unix (cygwin on my laptop) the file type is showing as binary file, So I am unable to process the file.
I need to extract some of the selected text from the file using grep. Can any one help me to solve this problem by providing the script to convert this file to .txt file in unix itself to avoid the time waste in opening the file in windows and saving it as .txt and opening it unix and processing it further.

Find my file in the attachment. I have hundreds of file like this.
Any help in this regard is highly aprreciable.
Thanks..

-----Post Update-----

I just renamed the file to .txt extension as I am unable to upload in this forum. Don't get confuse with this. It is originally a .log extension file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to convert PS files to txt file?

Hi, I need to convert PS files to txt file. I thought of using ps2ascii, but its not installed in my AIX box, any other option? (2 Replies)
Discussion started by: redlotus72
2 Replies

2. Shell Programming and Scripting

convert a txt file to xls file

How to convert a txt file(tab delimiter) to xls file. Looking forward help. Thanks, Venkatesh. (2 Replies)
Discussion started by: venkatesht
2 Replies

3. UNIX for Dummies Questions & Answers

To convert a txt file to .xls file

i want to convert a comma seprated file into a .xls file the file contains 3 fields seprated by a comma. i want to convert it into a .xls file with 3 columns and 37 rows DPRPT400,01/15/2009-15:03:06,01/15/2009-15:03:08 DPRPT401,01/15/2009-15:03:15,01/15/2009-15:03:32... (11 Replies)
Discussion started by: manit
11 Replies

4. Shell Programming and Scripting

PERL:How to convert numeric values txt file to PACKED DECIMAL File?

Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL. Regards, Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies

5. Shell Programming and Scripting

How to convert a txt file to xml file

Hello, I donot have exact lenght of the file. But i want entire txt of the file to send it into one node. for example I have txt file.. asdfghjklmnbvcxzqwertyuiop., nswwneikniniwn so i need the output as <documentbody>asdfghjklmnbvcxzqwertyuiop., ... (9 Replies)
Discussion started by: Hemantgupta84
9 Replies

6. UNIX for Advanced & Expert Users

Convert delimiter to string in txt file

Hi, I need to convert tab delimiter to #*# in txt file. Does anybody know how to do it? If i'm using: tr -s '\t' '#*#' < name.txt > name_new.txt It converts only to #, but I need 3 chars. Thanks a lot. (2 Replies)
Discussion started by: borsud
2 Replies

7. UNIX for Dummies Questions & Answers

Cannot convert this .pages file to a .txt file?!?

I'm trying to use the textutil feature in terminal to convert this .pages file to a .txt file. I've succeeded converting other files like .doc or .docx over to a .txt but this one in particular is giving me headache. I changed the permission rights to 755 but I don't think that mattered to begin... (1 Reply)
Discussion started by: syregnar86
1 Replies

8. Shell Programming and Scripting

Need to convert output.txt into html file

I have output.txt file generated through shell scripts which need convert in tabular format using html can you please help me output.txt Token State Date1 Date2 Description Name 34567 open 27/06/13 28/06/13 ... (5 Replies)
Discussion started by: vijay_rajni
5 Replies

9. Solaris

How to convert pdf file to txt?

Hello Unix gurus, I am learning unix. I have lots pdf data files. I need to convert them into txt files. Can you please guide me how to do that? Thanks in advance. Rao (1 Reply)
Discussion started by: raopatwari
1 Replies

10. UNIX for Beginners Questions & Answers

Convert a txt file to a CSV file

Hi , I have a Txt file which consist of 1000's of SOAP request and response and i want the file to be converted to a csv file like column a should have a soap request and column b should have the soap response . can someone assist me in achieving this please ? Thanks (2 Replies)
Discussion started by: kumarm8
2 Replies
PRN2PS(1)						User Contributed Perl Documentation						 PRN2PS(1)

NAME
prn2ps - PostScript Conversion Utility PURPOSE
prn2ps converts Windows PostScript to Unix PostScript. The input to this program is typically generated by printing to a PostScript printer connected to the FILE: logical device. The output can be converted to Encapsulated PostScript using GhostScript's p2epsi program. USAGE
usage : prn2ps [-h[help]] [-o[out_ext]] [-l[log_ext]] [-O[out_dir]] prn_file ... purpose: convert Windows PostScript to Unix PostScript version: 2.000 (SDF 2.001) The options are: Option Description -h display help on options -o output file extension -l log file extension -O output to input file's (or explicit) directory DESCRIPTION
The -h option provides help. If it is specified without a parameter, a brief description of each option is displayed. To display the attributes for an option, specify the option letter as a parameter. By default, generated output goes to standard output. To direct output to a file per input file, use the -o option to specify an extension for output files. If the -o option is specified without a parameter, an extension of out is assumed. Likewise, error messages go to standard error by default. Use the -l option to create a log file per input file. If the -l option is specified without a parameter, an extension of log is assumed. By default, generated output and log files are created in the current directory. Use the -O option to specify an explicit output directory. If the -O option is specified without a parameter, the input file's directory is used. For each input file, the output is generated by: o deleting the PageSize information o deleting the control-D at the end of the file. EXAMPLES
To generate an Encapsulated PostScript file from Windows PostScript: prn2ps -ops myfig.prn ps2epsi myfig.ps LIMITATIONS AND FUTURE DIRECTIONS
If ps2epsi doesn't like the output, you may need to use another printer driver to generate the input. On Windows NT 4.0, the Canon PS-IPU Color Laser Copier v52.3 driver works most of the time. perl v5.12.4 2011-11-09 PRN2PS(1)
All times are GMT -4. The time now is 09:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy