12-13-2007
hi frank,
sed 's/'`echo "\015"`'//g' filename - worked
thank you so much
10 More Discussions You Might Find Interesting
1. HP-UX
i have found a structure contained in file global _pstat_body.h at the path
/usr/include/sys/pstat which is
named __pst_dynamic . A field by name psd_cpu_time is
an array of maximum cpu states the kernel supports .
i,e psd_cpu_time specify all
the cpu timings in an array... (8 Replies)
Discussion started by: vish_shan
8 Replies
2. UNIX for Advanced & Expert Users
Hi,
like to ask why when i tried to run my .sh file to convert maybe a text file using dos2unix -ascii ${DATAFILE5} ${DATAFILE5} i got an error saying :
could not open /dev/kbd to get keyboard type US keyboard assumed
could not get keyboard type US keyboard assumed
Is it because we dun like... (4 Replies)
Discussion started by: blueberry80
4 Replies
3. Linux
Hi All,
I want to use the command "dos2unix" to format the file line break from win to unix,
but after changing the file permission has been change to 600.
how can i keep the original permisson after formatting?
Many thz (2 Replies)
Discussion started by: eric_wong_ch
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Does anyone know, how to use dos2unix command for binary files? When i am using the command, the binary file gets converted to ASCII file. I want binary file to remain in the binary format. (4 Replies)
Discussion started by: agarwal
4 Replies
5. Shell Programming and Scripting
Hi ,
I have one script setting envrioments varaible , calling this scripts in another script,i wnat to user thoese envrioemnt variables in parent script.
I am trying set envrioment variables with "export" comand i am unable to access thoese envrioment variables.
$ cat dm_env21... (3 Replies)
Discussion started by: ramakoti.s
3 Replies
6. Shell Programming and Scripting
hi,
need some urgent inputs.....
I have a folder, which has both files and directories as its contents.
I want to convert all the files (Excluding the directories) from dos to unix mode using the command 'dos2unix'.....
please can any one help me in providing the command to convert... (3 Replies)
Discussion started by: cmaroju
3 Replies
7. UNIX for Dummies Questions & Answers
if (my $temp2=$b2e_r->cmd(cmd=>"dos2unix $b2e_file_name"))
Even if it fails as,
Jul 25 17:17:02 dos2unix /volume/systest/hello_manoj.results
dos2unix /volume/systest/hello_manoj.results
dos2unix: converting file /volume/systest/hello_manoj.results to UNIX format ...
Failed to open... (3 Replies)
Discussion started by: manojn
3 Replies
8. Shell Programming and Scripting
hi friends i am using the dos2unix command to remove the ^M characters coming at the end of each line , but i getting the folowing message:
> dos2unix file.sql
could not open /dev/kbd to get keyboard type US keyboard assumed
could not get keyboard type US keyboard assumed
---------file... (6 Replies)
Discussion started by: neelmani
6 Replies
9. UNIX for Advanced & Expert Users
Hi,
I was trying to dos2unix a file that has some special characters but dos2unix converted those into different format. I am working on sun server.
I guess the default for dos2unix on sun server is ISO format .
Can i change the format so that it does the conversion in UTF format?
Because I... (3 Replies)
Discussion started by: abhi1988sri
3 Replies
10. Shell Programming and Scripting
Hi,
I have to test to see if dos2unix is installed on the machine. Right now I am typing in dos2unix and hitting ctrl C. Is there a better workaround for this. If dos2unix is there is need to print the statement saying its there and vice versa. How can i accomplish this.
thank you in... (1 Reply)
Discussion started by: tarreddy
1 Replies
LEARN ABOUT PLAN9
dos2unix
dos2unix(1) User Commands dos2unix(1)
NAME
dos2unix - convert text file from DOS format to ISO format
SYNOPSIS
dos2unix [-ascii] [-iso] [-7] [-437 | -850 | -860 | -863 | -865] originalfile convertedfile
DESCRIPTION
The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters.
This command can 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, dos2unix will rewrite the original file after converting it.
OPTIONS
The following options are supported:
-ascii Removes extra carriage returns and converts end of file characters in DOS format text files to conform to SunOS require-
ments.
-iso This is the default. It converts characters in the DOS extended character set to the corresponding ISO standard charac-
ters.
-7 Converts 8 bit DOS graphics characters to 7 bit space characters so that SunOS can read the file.
On non-i386 systems, dos2unix 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 DOS format that is being converted to ISO format.
convertedfile The new file in ISO format that has been converted from the original DOS file format.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO
unix2dos(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 temporary file name = filename.
Could not rename temporary file 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 dos2unix(1)