Sponsored Content
Top Forums Shell Programming and Scripting Delimiter Conversion(Generic Code) Post 302748027 by RudiC on Monday 24th of December 2012 06:38:33 AM
Old 12-24-2012
Not sure I understand. Do you know the delimiter from the beginning? Then use rbatte1's proposal. If you don't, I guess you're lost. How do you want a generic code to guess the delimiters that can be any character? Even more between other (like double quote) chars for special treatment?
And how do you want the code to tell header lines from data lines?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Code conversion from JSP to PYTHON

Guys I need to convert a code from JSP (Java Tags are also there inside JSP) to PYTHON. I have OK kind of knowledge in PYTHON, but dont have a muck knowledge in JAVA/JSP. Any idea how to approach? Thanks in advance to all C Saha (1 Reply)
Discussion started by: csaha
1 Replies

2. Solaris

Generating a generic incremental code

Hi Gurus, I have several Solaris systems (say system a, system b,system c) which will connect to a windows system (system Z) using SFTP session. I have a 'txt' file on System Z , which has a simple numeric value on it(say 1) , If I have to increment this number with 1 (1+1 =2) irrespective of... (3 Replies)
Discussion started by: ramky79
3 Replies

3. Shell Programming and Scripting

Substring based on delimiter, finding last delimiter

Hi, I have a string like ABC.123.XYZ-A1-B2-P1-C4. I want to delimit the string based on "-" and then get result as only two strings. One with string till last hyphen and other with value after last hyphen... For this case, it would be something like first string as "ABC.123.XYZ-A1-B2-P1" and... (6 Replies)
Discussion started by: gupt_ash
6 Replies

4. Shell Programming and Scripting

Conversion of '|' delimiter

Hello All, I want to convert the data saparated by '|' delimited in the flat file to the readable format. The every odd number '|' (pipe) to be converted to '\tab' and every even numbered '|' to '\n' and transfer the data to another file. example. ... (12 Replies)
Discussion started by: ssachins
12 Replies

5. UNIX for Advanced & Expert Users

Conversion from ASCII to binary for physical simulation code in C/C++

Good evening, everybody A good math friend told me that it would be possible to shrink the size of the numerical datas I produce with a physical simulation code I programmed for my PhD. It usually writes at least 100 GB to complete the simulation, and it seems that it is too high. There are... (7 Replies)
Discussion started by: Cybertib
7 Replies

6. Shell Programming and Scripting

How to cut by delimiter, and delimiter can be anything except numbers?

Hi all, I have a number of strings like below: //mnt/autocor/43°13'(33")W/ and i'm trying to get the numbers in this string, for example 431333 please help thanks ahead (14 Replies)
Discussion started by: sunnydanniel
14 Replies

7. Shell Programming and Scripting

conversion of code in perl and python

How to convert below bash code in perl and python. for BLOCK in /sys/block/emcpow* do echo "100000" > "$BLOCK"/queue/nr_requests echo "noop" > "$BLOCK"/queue/scheduler done (2 Replies)
Discussion started by: learnbash
2 Replies

8. Shell Programming and Scripting

Shell script to put delimiter for a no delimiter variable length text file

Hi, I have a No Delimiter variable length text file with following schema - Column Name Data length Firstname 5 Lastname 5 age 3 phoneno1 10 phoneno2 10 phoneno3 10 sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies

9. Shell Programming and Scripting

Perl Code to change file delimiter (passed as argument) to bar delimiter

Hi, Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters. Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
iconv_zh_TW(5)							File Formats Manual						    iconv_zh_TW(5)

NAME
iconv_zh_TW - code set conversion tables in traditional Chinese (zh_TW) locale AVAILABILITY
SUNWhleu DESCRIPTION
The following code set conversions are supported: Code Set Conversions Supported Code Symbol TargetCode Symbol CNS 11643 zh_TW-euc Big-5 zh_TW-big5 CNS 11643 zh_TW-euc ISO 2022-7 zh_TW-iso2022-7 CNS 11643 zh_TW-euc UTF-8 UTF-8 CNS 11643 zh_TW-euc IS0 2022-CN-EXT zh_TW-iso2022-CN-EXT Big-5 zh_TW-big5 CNS 11643 zh_TW-euc Big-5 zh_TW-big5 ISO 2022-7 zh_TW-iso2022-7 Big-5 zh_TW-big5 IS0 2022-CN-EXT zh_TW-is02022-CN-EXT Big-5 zh_TW-big5 UTF-8 UTF-8 ISO 2022-7 zh_TW-iso2022-7 CNS 11643 zh_TW-euc ISO 2022-7 zh_TW-iso2022-7 Big-5 zh_TW-big5 IS0 2022-7 zh_TW-iso2022-7 UTF-8 UTF-8 IS0 2022-CN-EXT zh_TW-iso2022-CN-EXT CNS 11643 zh_TW-euc IS0 2022-CN-EXT zh_TW-iso2022-CN-EXT Big-5 zh_TW-big5 Code Page 937 zh_TW-cp937 UTF-8 UTF-8 BIG5HK zh_HK-big5hk UTF-8 UTF-8 Big-5p zh_TW-big5p UTF-8 UTF-8 UTF-8 UTF-8 CNS 11643 zh_TW-euc UTF-8 UTF-8 IS0 2022-7 zh_TW-iso2022-7 UTF-8 UTF-8 Big-5 Big-5 UTF-8 UTF-8 Code Page 937 zh_TW-cp937 UTF-8 UTF-8 BIG5HK zh_HK-big5hk UTF-8 UTF-8 Big-5p zh_TW-big5p Conversions are performed as described below. For all conversions, if the source code set includes characters not included in the target code set, conversion and output for all such characters will be done using a substitute characters. zh_TW-euc to UTF-8 and UTF-8 to zh_TW-euc Conversion modules are provided to convert CNS 11643 plane 1, 2 and 3 characters between EUC-TW and UTF-8 encodings. If input data which does not belong to the above charset is encountered, it will be replaced with the substitute character (zh_TW-euc: '??' (0x3f3f), UTF-8: U+FFFD (0xefbfbd)). zh_TW-euc to zh_TW-big5 and zh_TW-big5 to zh_TW-euc Conversion modules can be used to convert CNS 11643 plane 1 and 2 characters between EUC-TW and BIG5 encodings. If input data which does not belong to the above charset is encountered, it will be replaced with the subsitute character (zh_TW-euc: '__' (0x5f5f), zh_TW-big5: '__' (0x5f5f)). Note that the seven additional popular characters from ETen extension have been supported, they belong to CNS 11643 plane 3. zh_TW-euc to zh_TW-iso2022-7 and zh_TW-iso2022-7 to zh_TW-euc Conversion modules can be used to convert CNS 11643 characters between EUC-TW and ISO-2022-7 encodings. zh_TW-euc to zh_TW-iso2022-CN-EXT and zh_TW-iso2022-CN-EXT to zh_TW-euc Conversion modules can be used to convert GB 2312-80, CNS 11643 plane 1, 2, 3, 4, 5, 6 and 7 characters between EUC-TW and IS0-2022-CN-EXT encodings. zh_TW-big5 to UTF-8 and UTF-8 to zh_TW-big5 Conversion modules are provided to convert Big-5 characters between BIG5 and UTF-8 encodings. If input data which does not belong to the above charset is encountered, it will be replaced with the substitute character (zh_TW-big5: '??' (0x3f3f), UTF-8: U+FFFD (0xefbfbd)). Note that the seven additional popular characters from ETen extension have been supported, they are 0xf9d6 -- 0xf9dc. zh_TW-big5 to zh_TW-iso2022-7 and zh_TW-iso2022-7 to zh_TW-big5 Conversion modules can be used to convert Big-5 characters between BIG5 and ISO-2022-7 encodings. If input Big-5 data which does not have corresponding CNS 11643 character is encountered, it will be replaced with the substitute character (zh_TW-iso2022-7: '__' (0x5f5f)). zh_TW-big5 to zh_TW-iso2022-CN-EXT and zh_TW-iso2022-CN-EXT to zh_TW-big5 Conversion modules are provided to convert Big-5 characters between BIG5 and ISO-2022-CN-EXT encodings. If input Big-5 data which does not have corresponding CNS 11643 character is encountered, it will be replaced with the substitute character (zh_TW-iso2022-7: '__' (0x5f5f)). zh_TW-big5p to UTF-8 and UTF-8 to zh_TW-big5p Conversion modules can be used to convert Big-5p characters between BIG5+ and UTF-8 encodings. If input data which doesn't belong to the above charset is encountered, it will be replaced with the substitute character (zh_TW-big5p: '??' (0x3f3f), UTF-8: U+FFFD). zh_HK-big5hk to UTF-8 and UTF-8 to zh_HK-big5hk Conversion modules can be used to convert HKSCS and Big-5 characters between BIG5HK and UTF-8 encoding. If input data which does not belong to the above charsets is encountered, it will be replaced with the substitute character (zh_HK-big5hk: '??' (0x3f3f), UTF-8: U+FFFD). zh_TW-cp937 to UTF-8 and UTF-8 to zh_TW-cp937 Conversion modules are provided to convert CNS 11643 characters between IBM Code Page 937 and UTF-8 encodings. zh_TW-iso2022-7 to UTF-8 and UTF-8 to zh_TW-iso2022-7 Conversion modules can be used to convert CNS 11643 characters between ISO-2022-7 and UTF-8 encodings. SEE ALSO
iconv(1), iconv(3), iconv(5), iconv_zh(5) 2 Nov 2001 iconv_zh_TW(5)
All times are GMT -4. The time now is 12:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy