Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problems with Dutch and converting files to UNIX Post 302893979 by Don Cragun on Saturday 22nd of March 2014 05:10:13 PM
Old 03-22-2014
If you're sure you just want to delete the 1st three bytes of a file:
Code:
dd ibs=1 skip=3 if=filename of=filename.new

These 2 Users Gave Thanks to Don Cragun For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

converting files from unix to windows

Need Help?? We receive Files From GM Motors and they written on a Sun Workstation using the Tar Command on a 4mm Dat Tape. We have an HP sure Store 24 Tape drive that will Execpt but when i do that it says that the media is bad. was wondering if there was any software that would read it in its... (2 Replies)
Discussion started by: jefft1976
2 Replies

2. UNIX Desktop Questions & Answers

Converting BMP to BM (or other unix format)

Hey pllz, ive got a little problem, i want to convert a bmp of gif or jpg to an unix format (bm) anybody got any suggestions ? greets\EJ (1 Reply)
Discussion started by: EJ =)
1 Replies

3. OS X (Apple)

Converting Unix executable files

I loaded OS X Panther on my Mac G4 and found that many files previously saved as Word or Word Perfect files were inadventently converted to Unix executable files. When I try to read these in Word, it cannot recognize or translate the file properly. Does anyone know how to translate these files? Is... (4 Replies)
Discussion started by: Steven Greenber
4 Replies

4. UNIX for Dummies Questions & Answers

Converting Unix text to windows

I am trying to FTP a text file from a machine running LynxOS and I am having problems with the way windows "sees" the characters. For example this is how windows presents the text:     DevProcRcpClass The boxes are what I am having problems with. When viewing the same file on a... (3 Replies)
Discussion started by: mchristisen
3 Replies

5. Windows & DOS: Issues & Discussions

Converting UNIX scripts to DOS

Is there a tool available to convert UNIX (BASH Shell) scripts to DOS scripts? I understand that DOS scripting is far inferior to unix scripting, and therfore this conversion may not be possible. Alternativley, perhaps I could convert my Unix scripts to C... then compile it for a windows... (2 Replies)
Discussion started by: Crozz
2 Replies

6. Shell Programming and Scripting

Converting DOS filetype to UNIX

Hello folks I am working on a project that requires me to write a script that operates on a bunch of text files. When I try less file.txt I see a bunch of ^M's everywhere. Some Googling tells me that this is because the files have a DOS fileformat and found the following fixes: sed 's/^M$//'... (5 Replies)
Discussion started by: ksk
5 Replies

7. Shell Programming and Scripting

awk - problems by converting date-format

Hi i try to change the date-format from DD/MM/YYYY into MM/DD/YY. Input-Data: ... 31/12/2013,23:40,198.00,6.20,2,2,2,1,11580.0,222 31/12/2013,23:50,209.00,7.30,2,2,3,0,4380.0 01/01/2014,00:00,205.90,8.30,2,2,3,1,9360.0,223 ... Output-Data should be: ...... (7 Replies)
Discussion started by: IMPe
7 Replies

8. Shell Programming and Scripting

Converting Multiline Files to Flat Files?

How to convert this: F1-R1 F1-R2 F1-R3 into a flat file for bash?? Each record F2-R1 F2-R2 F2-R3 F3-R1 F3-R2 F3-R3 F4-R1 F4-R2 F4-R3is on one line with all fields for that record, put into an output file. The output file should look like this when converted: F1-R1,F2-R1,F3-R1,F4-R1... (6 Replies)
Discussion started by: bud1738
6 Replies

9. Homework & Coursework Questions

Converting .dat to UNIX

I uploaded a .dat file from sftp to my server and after using dos2unix to convert the file and check my work it says that the file was not transferred correctly and that the content is garbled. Please help (3 Replies)
Discussion started by: Ovid158
3 Replies
PRECONV(1)                                                    General Commands Manual                                                   PRECONV(1)

NAME
preconv - convert encoding of input files to something GNU troff understands SYNOPSIS
preconv [-dr] [-e encoding] [files ...] preconv -h | --help preconv -v | --version It is possible to have whitespace between the -e command line option and its parameter. DESCRIPTION
preconv reads files and converts its encoding(s) to a form GNU troff(1) can process, sending the data to standard output. Currently, this means ASCII characters and '[uXXXX]' entities, where 'XXXX' is a hexadecimal number with four to six digits, representing a Unicode input code. Normally, preconv should be invoked with the -k and -K options of groff. OPTIONS
-d Emit debugging messages to standard error (mainly the used encoding). -Dencoding Specify default encoding if everything fails (see below). -eencoding Specify input encoding explicitly, overriding all other methods. This corresponds to groff's -Kencoding option. Without this switch, preconv uses the algorithm described below to select the input encoding. --help -h Print help message. -r Do not add .lf requests. --version -v Print version number. USAGE
preconv tries to find the input encoding with the following algorithm. 1. If the input encoding has been explicitly specified with option -e, use it. 2. Otherwise, check whether the input starts with a Byte Order Mark (BOM, see below). If found, use it. 3. Finally, check whether there is a known coding tag (see below) in either the first or second input line. If found, use it. 4. If everything fails, use a default encoding as given with option -D, by the current locale, or 'latin1' if the locale is set to 'C', 'POSIX', or empty (in that order). Note that the groff program supports a GROFF_ENCODING environment variable which is eventually expanded to option -k. Byte Order Mark The Unicode Standard defines character U+FEFF as the Byte Order Mark (BOM). On the other hand, value U+FFFE is guaranteed not be a Unicode character at all. This allows to detect the byte order within the data stream (either big-endian or lower-endian), and the MIME encodings 'UTF-16' and 'UTF-32' mandate that the data stream starts with U+FEFF. Similarly, the data stream encoded as 'UTF-8' might start with a BOM (to ease the conversion from and to UTF-16 and UTF-32). In all cases, the byte order mark is not part of the data but part of the encoding protocol; in other words, preconv's output doesn't contain it. Note that U+FEFF not at the start of the input data actually is emitted; it has then the meaning of a 'zero width no-break space' character - something not needed normally in groff. Coding Tags Editors which support more than a single character encoding need tags within the input files to mark the file's encoding. While it is pos- sible to guess the right input encoding with the help of heuristic algorithms for data which represents a greater amount of a natural lan- guage, it is still just a guess. Additionally, all algorithms fail easily for input which is either too short or doesn't represent a natu- ral language. For these reasons, preconv supports the coding tag convention (with some restrictions) as used by GNU Emacs and XEmacs (and probably other programs too). Coding tags in GNU Emacs and XEmacs are stored in so-called File Variables. preconv recognizes the following syntax form which must be put into a troff comment in the first or second line. -*- tag1: value1; tag2: value2; ... -*- The only relevant tag for preconv is 'coding' which can take the values listed below. Here an example line which tells Emacs to edit a file in troff mode, and to use latin2 as its encoding. ." -*- mode: troff; coding: latin-2 -*- The following list gives all MIME coding tags (either lowercase or uppercase) supported by preconv; this list is hard-coded in the source. big5, cp1047, euc-jp, euc-kr, gb2312, iso-8859-1, iso-8859-2, iso-8859-5, iso-8859-7, iso-8859-9, iso-8859-13, iso-8859-15, koi8-r, us-ascii, utf-8, utf-16, utf-16be, utf-16le In addition, the following hard-coded list of other tags is recognized which eventually map to values from the list above. ascii, chinese-big5, chinese-euc, chinese-iso-8bit, cn-big5, cn-gb, cn-gb-2312, cp878, csascii, csisolatin1, cyrillic-iso-8bit, cyrillic-koi8, euc-china, euc-cn, euc-japan, euc-japan-1990, euc-korea, greek-iso-8bit, iso-10646/utf8, iso-10646/utf-8, iso-latin-1, iso-latin-2, iso-latin-5, iso-latin-7, iso-latin-9, japanese-euc, japanese-iso-8bit, jis8, koi8, korean-euc, korean-iso-8bit, latin-0, latin1, latin-1, latin-2, latin-5, latin-7, latin-9, mule-utf-8, mule-utf-16, mule-utf-16be, mule-utf-16-be, mule-utf-16be-with-signature, mule-utf-16le, mule-utf-16-le, mule-utf-16le-with-signature, utf8, utf-16-be, utf-16-be-with-signature, utf-16be-with-signature, utf-16-le, utf-16-le-with-signature, utf-16le-with-signature Those tags are taken from GNU Emacs and XEmacs, together with some aliases. Trailing '-dos', '-unix', and '-mac' suffixes of coding tags (which give the end-of-line convention used in the file) are stripped off before the comparison with the above tags happens. Iconv Issues preconv by itself only supports three encodings: latin-1, cp1047, and UTF-8; all other encodings are passed to the iconv library functions. At compile time it is searched and checked for a valid iconv implementation; a call to 'preconv --version' shows whether iconv is used. BUGS
preconv doesn't support local variable lists yet. This is a different syntax form to specify local variables at the end of a file. SEE ALSO
groff(1) the GNU Emacs and XEmacs info pages COPYING
Copyright (C) 2006-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. Groff Version 1.22.3 10 February 2018 PRECONV(1)
All times are GMT -4. The time now is 08:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy