07-31-2009
Hi,
Thanks for the reply. I have already handled replacing ^M characters in shell script. The issue with other special character (like rectangle shaped one). This character will be in the first position only in first line.
I will tell what i am doing. We get csv file from SAP server in our Unix server. This file has delimitter of tab. We need to replace tab with comma.
We have script that replaces tab with comma.
Before changing tab to comma, we opened the file from telnet and found the rectangle box in the first position in the first line.
After changing tab to comma using shell script, we opened the file from telnet and we noticed rectangle box in the first position in the first line.
When we download this file to our windows box and opened in excel by double clicking. We are seeing small small boxes and no content. If we open in notepad then we are able to see the content.
We manually removed rectangle shaped content from Unix and download into windows and opened the file in excel. This time, we are able to see the content.
We searched in google to get some help. They are telling it is something to do with encoding to UTF-8 before FTPing to Unix server. We have this capability in notepad, but we wanted to do this program without user intervention.
Please help me.
Thanks in advance.
Venkat
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to capture a file's creation/modification date and time and convert this to a different format, whilst I can easily get the existing format from a ls -l | awk ' { print $......}' or a cut command I do not know how to convert it to a desired format?
I should add that at present the ls -l... (1 Reply)
Discussion started by: barney_clough
1 Replies
2. Shell Programming and Scripting
How can I can convert a string in a shell script that looks something like: ]] to unicode equivalent?
thanks a lot,
webtekie (1 Reply)
Discussion started by: webtekie
1 Replies
3. 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
4. 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
5. Shell Programming and Scripting
Hello,
For 2 days now i've been searching for a solution to this. I am now beginning to doubt this is even possible. It's even harder when you don't know how to search for it. (which keywords generate enough relevancy etc..)
I need to parse a config file to generate a CSV file in return.
It... (7 Replies)
Discussion started by: zer0dvide
7 Replies
6. Shell Programming and Scripting
My input file is Pipe delimited with 10 fields, I am trying to create a tab delimited output file with 6 fields from the provided input file.
Below is sample data
Input file
abc||2|PIN|num||||www.123.com|abc@123.com|
bcd||2|PIN|num|||||abc@123.com|... (3 Replies)
Discussion started by: pasupuleti81
3 Replies
7. Shell Programming and Scripting
Hi,
I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix.
My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies
8. Shell Programming and Scripting
How can I get an error when converting 3rd line, since it has invalid characters
abcde
a®cdée
a�cd�
Unicode for
® = ®
é = é
I used "iconv -f UTF-8 -t ISO-8859-15 in.txt > out.txt" (2 Replies)
Discussion started by: arunbs
2 Replies
9. Shell Programming and Scripting
Hi All,
I need help in converting the mentioned file format into desired output format using awk. Could anyone help me in this?
Below is the input..
Date Account Campaign AdGroup Keyword Conversion Revenue Var1 Var2 Var3 Var4 Var5 10 20 30 ... (8 Replies)
Discussion started by: Ravi S M
8 Replies
10. UNIX for Dummies Questions & Answers
My file format:
--------------------------------------------------
Complete Consistency Check
Valid Area : VALID:VALID
Started by : esanwad
Started at : Thu Dec 11 16:04:46 2014
CNA version : R21H04_EC08
Check range : AREA VALID/VALID
... (4 Replies)
Discussion started by: Gautam Banerjee
4 Replies
LEARN ABOUT REDHAT
xmtablist
XmTabList(library call) XmTabList(library call)
NAME
XmTabList -- Data type for a tab list
SYNOPSIS
#include <Xm/Xm.h>
XmTabList
DESCRIPTION
XmTabList is the data type for a tab list. A tab list consists of tab stop list entries (XmTabs). Whenever a tab component is encountered
while an XmString is being rendered, the origin of the next X draw depends on the next XmTab. If a tab stop would cause text to overlap,
the x position for the segment is reset to follow immediately after the end of the previous segment.
Tab lists are specified in resource files with the following syntax:
resource_spec: tab WHITESPACE [, WHITESPACE tab ]*
The resource value string consists of one or more tabs separated by commas. Each tab identifies the value of the tab, the unit type, and
whether the offset is relative or absolute. For example:
tab := float [ WHITESPACE units ]
float := [ sign ] [[ DIGIT]*. ]DIGIT+
sign := +
where the presence or absence of sign indicates, respectively, a relative offset or an absolute offset. Note that negative tab values are
not allowed. units indicates the unitType to use as described in the XmConvertUnits reference page.
For example, the following specifies a tab list consisting of a one inch absolute tab followed by a one inch relative tab:
*tabList: 1in, +1in
For resources of type, dimension, or position, you can specify units as described in the XmNunitType resource of the XmGadget, XmManager,
or XmPrimitive reference page.
RELATED
Refer to the Motif Programmer's Guide for more information about tabs and tab lists. XmTabListCopy(3), XmTabListFree(3), XmTabListGet-
Tab(3), XmTabListInsertTabs(3), XmTabListRemoveTabs(3), XmTabListReplacePositions(3), and XmTabListTabCount(3).
XmTabList(library call)