10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Asking for a Linux command line to
convert all files in current folder from UTF8 to ANSI, name unchanged.
Best Regards
Pei (3 Replies)
Discussion started by: jiapei100
3 Replies
2. Shell Programming and Scripting
wondering if anyone has any thoughts to convert the below thru a shell script
Convert decimal signalling point notation to ANSI point code notation
There is a site that does that conversion but i need to implement the solution in a shell script.....Thoughts....
OS: Solaris 9
... (4 Replies)
Discussion started by: aavam
4 Replies
3. Programming
I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry?
Only print out:
Thread ID: 0 START!
Thread ID: 0 END!
Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies
4. UNIX for Dummies Questions & Answers
1. I have a shell script which creates a file using cat command. How can i find what encoding the file follows (e.g. UTF8, ANSI)?
2. I want to convert that file to PC-ANSI format. How can i achieve that?
I tried using the echo $LANG command to find the default encoding. It says parameter not... (2 Replies)
Discussion started by: ssmallya
2 Replies
5. UNIX for Dummies Questions & Answers
:confused: Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies
6. UNIX for Advanced & Expert Users
:) Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies
7. Programming
I am a student. And need help on following program. I want to make a c program.
I have to scan a sentence and I have to interchange a word from that sentence.
Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Discussion started by: dhaval chevli
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I run into an error message like this
(Bundled]) cc: "flat.c", line 350: error 1705: Function prototypes are an ANSI feature.'
Also when trying to compile with -Aa or -Ae options I get
(Bundled) cc:warning 480: The -A option is available only with the C/ANSI C product; ignored.
Is that... (1 Reply)
Discussion started by: elenav
1 Replies
9. Programming
Dear All,
I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
Discussion started by: Frankie
4 Replies
10. Programming
To anyone that can answer this:
Are the differences great between the ANSI and K&R standard? What are some of the major differences between them??
-REM (1 Reply)
Discussion started by: REM
1 Replies
tofrodos(1) General Commands Manual tofrodos(1)
NAME
tofrodos - Converts text files between DOS and Unix formats.
SYNOPSIS
fromdos [ options ] [file...]
todos [ options ] [file...]
DESCRIPTION
DOS text files traditionally have carriage return and line feed pairs as their newline characters while Unix text files have the line feed
as their newline character. fromdos converts text files from the DOS format to the Unix format, while todos converts text files from the
Unix format to the DOS format.
The programs accept multiple filenames and wildcards as their arguments. You may also use them in a pipe. If either program finds its
input redirected, it will process stdin and place the output on stdout.
OPTIONS
-a Always convert. If converting from DOS to Unix, this option will cause the program to remove ALL carriage returns. The default is to
remove carriage returns only if they are followed by line feeds. If converting from Unix to DOS, this option will cause the program
to convert ALL linefeeds to carriage return pairs. The default is to convert linefeeds only if they are not already preceded by a
carriage return.
-b Make a backup of original file. The original file is renamed with the original filename and a .bak extension. For example, a file
called "filename.ext" becomes "filename.ext.bak". Important: the program behaves differently if it is compiled for DOS (as compared
to being compiled for Windows, Linux, Mac OS X or other systems). In view of the filename restrictions present on DOS, the DOS exe-
cutable will strip the original file extension, if any, from the file before appending the .bak extension. For example, "file-
name.ext" becomes "filename.bak".
-d Convert from DOS to Unix. This forces the program to convert the file in a particular direction. By default, if the program is named
fromdos or dos2unix, it will assume that the input file is in a DOS format and convert it to a Unix format. If the program is named
todos or unix2dos, it will assume that the input file is in a Unix format and convert it to a DOS format. Using the -d option forces
the program to convert from a DOS format to a Unix format regardless of how the program is named. Likewise, using the -u option
forces the program to convert from a Unix format to a DOS format regardless of the name of the program.
-e Abort processing on any error in any file. Normally, the program will simply skip to process the next file on the command line when
it encounters any errors. This option causes it to abort on errors.
-f Force: convert even if the file is not writeable (read-only). By default, if fromdos or todos finds that the file does not have
write permission, it will not process that file. This option forces the conversion even if the file is read-only.
-h Display a short help screen on the program usage and quit.
-l<logfile>
Log error messages to <logfile>. Note that if your command line has an error, such as when you specify an unknown option, the error
message for the command line option error will be issued to stderr instead and not logged.
-o Overwrite the original file (no backup). This is the default.
-p Preserve file ownership and time. On systems like Linux, the file ownership will only be preserved if the user is root, otherwise it
will just set the file time and silently fail the change of file ownership. If you want a warning message when the file ownership
cannot be changed, use -v.
-u Convert from Unix to DOS. See the -d option above for more information.
-v Verbose.
-V Show version message and quit.
AUTHOR
The program and its documentation are copyrighted (c) 1996-2008 by Christopher Heng. All rights reserved. They are distributed under the
terms of the GNU General Public License Version 2.
The latest version of tofrodos can be obtained from
http://www.thefreecountry.com/tofrodos/index.shtml
2011 Version 1.7.9 tofrodos(1)