Sponsored Content
Top Forums Shell Programming and Scripting Convert directory of text files to Unix/Linux Line Ending Post 302548414 by chipperuga on Thursday 18th of August 2011 10:41:25 AM
Old 08-18-2011
Available in a repository?

---------- Post updated at 10:41 AM ---------- Previous update was at 10:38 AM ----------

Thanks for the quick response, @vbe.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I convert unix text to to win text?

How do I convert unix text files into readable text for windows. Dave (1 Reply)
Discussion started by: nucca
1 Replies

2. UNIX for Dummies Questions & Answers

How to convert binary Unix file to text

Hi all, I have a print control file (dflt) for Oracle which is in binary. As I am going to develope an application in Window environment, I would like to reference the dflt file. But it is in binary format and I cannot access it. Anyone can suggest me how to convert the file into text or... (5 Replies)
Discussion started by: user12345
5 Replies

3. UNIX for Dummies Questions & Answers

convert all *. c files to *.cpp files in a directory

Hiiiii.... how to convert all *. c files to *.cpp files , in a directory given using shell script. :pThnaking u.:p (10 Replies)
Discussion started by: krishnampkkm
10 Replies

4. Shell Programming and Scripting

Stress testing php files at Unix/Linux Command line

Hi, Your great help is very appreciated. I am looking for any Unix command or tool for doing Stress/Load test of php files at command prompt. I tried torture.pl but it is not working after20 concurrent threads/users. as it is very urgent for me..please suggest ur ideas asap. thanks (5 Replies)
Discussion started by: Malleswari
5 Replies

5. UNIX for Dummies Questions & Answers

How to get last word from a line ending with "/" in Unix

Hello All, I have a scenario to read a file containing text like this:(say file name is Dummy.txt) /home/abc/test1/ | file1 /home/abc/test2/ | file2 I used a variable to store the content from file like this (say for line1): File=`head -1 Dummy.txt | cut -f1 -d "|"` Dir=`head -1 Dummy.txt... (2 Replies)
Discussion started by: Quesemail
2 Replies

6. UNIX for Dummies Questions & Answers

Listing files in a Unix Directory ending with .....

Hi Unix Gurus, I need to list all files in a Unix Directory which either end with a .pdf or .rtf and they should be case insensitive ie .Pdf , .pDF , .RtF etc are also possible. How can i accomplish this with with a ls command ? If not then a find command. (6 Replies)
Discussion started by: pchegoor
6 Replies

7. Windows & DOS: Issues & Discussions

Convert UNIX text file in Windows to recognize line breaks

Hmmm I think I found the correct subforum to ask my question... I have some text files that I prepared in vi some time ago, and now I want to open and edit them with Windows Notepad. I don't have a Unix terminal at the moment so I need to do the conversion in Windows. Is there a way to do this?... (1 Reply)
Discussion started by: frys_hp
1 Replies

8. UNIX for Dummies Questions & Answers

Convert UNIX text file in Windows to recognize line breaks

Hi all, I have some text files that I prepared in vi some time ago, and now I want to open and edit them with Windows Notepad. I don't have a Unix terminal at the moment so I need to do the conversion in Windows. Is there a way to do this? Or just reinsert thousands of line breaks again :eek: ? (2 Replies)
Discussion started by: frys_hp
2 Replies

9. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

10. Shell Programming and Scripting

Add text at start and ending of every line

Hi all, Is there other way to Add text at start and ending of every line? here my script: cat file.txt |awk '{print "<p align=\"justify\">"$0"</p>"}' but the problem they put including white spaces, I only need those line have a sentence or text not an skip all have empty string or have... (7 Replies)
Discussion started by: lxdorney
7 Replies
ICONV(1)                                                         Linux User Manual                                                        ICONV(1)

NAME
iconv - convert text from one character encoding to another SYNOPSIS
iconv [options] [-f from-encoding] [-t to-encoding] [inputfile]... DESCRIPTION
The iconv program reads in text in one encoding and outputs the text in another encoding. If no input files are given, or if it is given as a dash (-), iconv reads from standard input. If no output file is given, iconv writes to standard output. If no from-encoding is given, the default is derived from the current locale's character encoding. If no to-encoding is given, the default is derived from the current locale's character encoding. OPTIONS
-f from-encoding, --from-code=from-encoding Use from-encoding for input characters. -t to-encoding, --to-code=to-encoding Use to-encoding for output characters. If the string //IGNORE is appended to to-encoding, characters that cannot be converted are discarded and an error is printed after conversion. If the string //TRANSLIT is appended to to-encoding, characters being converted are transliterated when needed and possible. This means that when a character cannot be represented in the target character set, it can be approximated through one or several similar looking characters. Characters that are outside of the target character set and cannot be transliterated are replaced with a ques- tion mark (?) in the output. -l, --list List all known character set encodings. -c Silently discard characters that cannot be converted instead of terminating when encountering such characters. -o outputfile, --output=outputfile Use outputfile for output. -s, --silent This option is ignored; it is provided only for compatibility. --verbose Print progress information on standard error when processing multiple files. -?, --help Print a usage summary and exit. --usage Print a short usage summary and exit. -V, --version Print the version number, license, and disclaimer of warranty for iconv. EXIT STATUS
Zero on success, nonzero on errors. ENVIRONMENT
Internally, the iconv program uses the iconv(3) function which in turn uses gconv modules (dynamically loaded shared libraries) to convert to and from a character set. Before calling iconv(3), the iconv program must first allocate a conversion descriptor using iconv_open(3). The operation of the latter function is influenced by the setting of the GCONV_PATH environment variable: * If GCONV_PATH is not set, iconv_open(3) loads the system gconv module configuration cache file created by iconvconfig(8) and then, based on the configuration, loads the gconv modules needed to perform the conversion. If the system gconv module configuration cache file is not available then the system gconv module configuration file is used. * If GCONV_PATH is defined (as a colon-separated list of pathnames), the system gconv module configuration cache is not used. Instead, iconv_open(3) first tries to load the configuration files by searching the directories in GCONV_PATH in order, followed by the system default gconv module configuration file. If a directory does not contain a gconv module configuration file, any gconv modules that it may contain are ignored. If a directory contains a gconv module configuration file and it is determined that a module needed for this conversion is available in the directory, then the needed module is loaded from that directory, the order being such that the first suitable module found in GCONV_PATH is used. This allows users to use custom modules and even replace system-provided modules by pro- viding such modules in GCONV_PATH directories. FILES
/usr/lib/gconv Usual default gconv module path. /usr/lib/gconv/gconv-modules Usual system default gconv module configuration file. /usr/lib/gconv/gconv-modules.cache Usual system gconv module configuration cache. CONFORMING TO
POSIX.1-2001. EXAMPLE
Convert text from the ISO 8859-15 character encoding to UTF-8: $ iconv -f ISO-8859-15 -t UTF-8 < input.txt > output.txt The next example converts from UTF-8 to ASCII, transliterating when possible: $ echo abc B a EUR ac | iconv -f UTF-8 -t ASCII//TRANSLIT abc ss ? EUR abc SEE ALSO
locale(1), iconv(3), nl_langinfo(3), charsets(7), iconvconfig(8) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU 2018-02-02 ICONV(1)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy