Sponsored Content
Full Discussion: Open a file in UNIX mode
Top Forums Shell Programming and Scripting Open a file in UNIX mode Post 302803175 by Rashid Khan on Monday 6th of May 2013 05:45:06 AM
Old 05-06-2013
Open a file in UNIX mode

hi,

The function

Code:
open(OUTPUT, ">$output_filename");  #opens the file in (DOS) windows mode.

how to open the output file in unix mode.

please suggest.

thanks.

Last edited by radoulov; 05-06-2013 at 07:21 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

open a picture file in unix (putty)

hi i'm logged on to my schools unix machine via putty. how do i open/view a jpg picture file that is there on my root catalog? (2 Replies)
Discussion started by: javatutor
2 Replies

2. UNIX for Dummies Questions & Answers

How do u open a read only file in Unix?

How do u open a read only file in Unix? (1 Reply)
Discussion started by: JosephGerard
1 Replies

3. Shell Programming and Scripting

open unix file in windows

Hi, I have a text file in unix. i am trying to give a link in Internet explorer to that file. If i click on the link in Internet Explorer page then it should display the text from file in unix. is that anyway possible.... i am trying it for past 2 days....if i find a way out i will... (3 Replies)
Discussion started by: ganesh
3 Replies

4. UNIX for Dummies Questions & Answers

Open .zip file created in UNIX

Hi I am using the unix zip command to zip a file name to name .zip. I am then ftping the file to my windows Xp desktop and trying to open it using compressed(zipped) folders. Then iam getting an error like 'the compressed(zipped) folder is invalid or corrupted' Please advice. regards,... (5 Replies)
Discussion started by: sam99
5 Replies

5. Shell Programming and Scripting

how to identify the mode of the file in unix

hi, I have a requirement in that i need to process a input file The problem is, the input file sometimes it is coming in dos mode and some times it is coming in unix mode The script which i have written will process the file only if it is in unix mode and it is not processing if the file is in... (7 Replies)
Discussion started by: trichyselva
7 Replies

6. UNIX for Dummies Questions & Answers

open windows's .url file in unix

In windows, I can create a shortcut for websites. It's a .url file. the content of the file is like: How can I open it, the .url file, in firefox or google chrome in Unix(or just ubuntu)? (2 Replies)
Discussion started by: hz_i3
2 Replies

7. Solaris

Before I delete any file in Unix, How can I check no open file handle is pointing to that file?

I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command. I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file. Is there another command that can tell if a file has a truely active... (12 Replies)
Discussion started by: kchinnam
12 Replies

8. Shell Programming and Scripting

how to open a file and read a file in UNIX

HI can any one tell me how to open and read a file in UNIX actually i have the following script can you please suggest me on this.. LOG,">$log" or NotifyAdmin "Failed to open file $log";... this is the perl statement.. which opens log file. i want to open same log file in unix Thanks... (5 Replies)
Discussion started by: sravan008
5 Replies

9. UNIX for Dummies Questions & Answers

File processed in Unix had issue open using notepad

Dear all, I had a columned based file after processed from my script. In unix platform, my file is ok, with all columns sorted out nicely. But when i open in windows notepad, the columns are running out of order. Can some one help?? Thanks alot in advance (4 Replies)
Discussion started by: ymeyaw
4 Replies

10. Shell Programming and Scripting

Cannot open txt file in UNIX using cat utility

Hi, I am not being able to open txt files with 'cat'. One thing to mention is, the filenames start with #. I guess one can have a unix filename that starts with a special/wildcard character. I have filenames starting with @ and they are opening perfectly with cat. (5 Replies)
Discussion started by: Subhasis
5 Replies
unix2dos(1)                                                        User Commands                                                       unix2dos(1)

NAME
unix2dos - convert text file from ISO format to DOS format SYNOPSIS
unix2dos [-ascii] [-iso] [-7] [-437 | -850 | -860 | -863 | -865] originalfile convertedfile DESCRIPTION
The unix2dos utility converts ISO standard characters to the corresponding characters in the DOS extended character set. This command may be invoked from either DOS or SunOS. However, the filenames must conform to the conventions of the environment in which the command is invoked. If the original file and the converted file are the same, unix2dos will rewrite the original file after converting it. OPTIONS
The following options are supported: -ascii Adds carriage returns and converts end of file characters in SunOS format text files to conform to DOS requirements. -iso This is the default. Converts ISO standard characters to the corresponding character in the DOS extended character set. -7 Converts 8 bit SunOS characters to 7 bit DOS characters. On non-i386 systems, unix2dos will attempt to obtain the keyboard type to determine which code page to use. Otherwise, the default is US. The user may override the code page with one of the following options: -437 Use US code page -850 Use multilingual code page -860 Use Portuguese code page -863 Use French Canadian code page -865 Use Danish code page OPERANDS
The following operands are required: originalfile The original file in ISO format that is being converted to DOS format. convertedfile The new file in DOS format that has been converted from the original ISO file format. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
dos2unix(1), ls(1), attributes(5) DIAGNOSTICS
File filename not found, or no read permission The input file you specified does not exist, or you do not have read permission. Check with the SunOS command, ls -l (see ls(1)). Bad output filename filename, or no write permission The output file you specified is either invalid, or you do not have write permission for that file or the directory that contains it. Check also that the drive or diskette is not write-protected. Error while writing to temporary file An error occurred while converting your file, possibly because there is not enough space on the current drive. Check the amount of space on the current drive using the DIR command. Also be certain that the default diskette or drive is write-enabled (not write-pro- tected). Notice that when this error occurs, the original file remains intact. Translated tmpfile name = filename. Could not rename tmpfile to filename. The program could not perform the final step in converting your file. Your converted file is stored under the name indicated on the second line of this message. SunOS 5.10 14 Sep 2000 unix2dos(1)
All times are GMT -4. The time now is 03:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy