03-05-2005
It would be dos2unix rather than dos2ux.
Correct me if Iam wrong.
Vino
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi to all
im having some 20,000 files in that im having some contents say the tabulation of biophysics lab readings ... and i want read tat file and look into tat wether a number say -18.90 is there r not .. and if there print tat no wit file name beside
thank you:D (1 Reply)
Discussion started by: maximas
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes..
i wanna attach a text file and send to a mail id..used the following code :
uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com
it works... (2 Replies)
Discussion started by: ash22
2 Replies
3. Shell Programming and Scripting
sed 's/^..//' file1.txt > file2.txt
this will remove the first two characters of each line of a text file, what sed command will remove the last two characters? This is a similar post to my other....sry if I'm being lazy....
I need a file like this (same as last post)
>cat file1.txt
10081551... (1 Reply)
Discussion started by: ajp7701
1 Replies
4. Shell Programming and Scripting
Can anyone tell me how to read a file in perl having junk characters . I have only one junk character which is repeated many times in the file. While i'm reading and printing the file , it is displaying till the 1st occurence of that junk character and rest of the file is not being read. (1 Reply)
Discussion started by: k_surya
1 Replies
5. Shell Programming and Scripting
How do I filter only comments and still keep Line breaks at the end of the line!?
This is one of the common tasks we all do,, How can we do this in a right way..!?
I try to ignore empty lines and commented lines using following approach.
test.sh
# \040 --> SPACE character octal... (17 Replies)
Discussion started by: kchinnam
17 Replies
6. Programming
Hi,
I have a .txt file which contains the x, y and z co-ordinates of particles which I am trying to cast for a particular compound. The no. of particles present is of the order of 2 billion and hence the size of the text file is of the order of a few Gigabytes. The particles have been casted layer... (5 Replies)
Discussion started by: mugga
5 Replies
7. Shell Programming and Scripting
Dear Shell scripters,
I have a small code which copy the txt files from some destination to file name OutPutFile.
I want to modify this script to introduce several constant.
The string it is reading is like
... (2 Replies)
Discussion started by: nrjrasaxena
2 Replies
8. UNIX for Dummies Questions & Answers
I need to write a C-Shell script with these properties: It should accept two arguments on the command line. The first argument is the name of a file which contains a list of names, and the second argument is the name of a directory. For each file in the directory, the script should print the... (1 Reply)
Discussion started by: cerce
1 Replies
9. Shell Programming and Scripting
Dear all,
I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script.
Any help is greatly appreciated.
Greetings,
emily
DATA.txt (snippet of the huge text file)
407202849... (2 Replies)
Discussion started by: emily
2 Replies
10. Shell Programming and Scripting
echo "1.1 Apply latest OS patches;"
awk '/1.2 Install/ {P=0} P {print $0} FNR==1{printf("From file %s:\n", FILENAME)} /1.1 Apply/ {P=1}' solarisappsummary.txt solarisdbsummary.txt solaris_websummary.txt
echo "1.2 Install TCP Wrappers;"
awk '/1.3 Install/ {P=0} P {print $0}... (1 Reply)
Discussion started by: alvinoo
1 Replies
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)