Pound symbol is not displayed in Linux file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Pound symbol is not displayed in Linux file
# 1  
Old 11-26-2012
Pound symbol is not displayed in Linux file

Hi All,

I am trying to copy a test from database into a file, basically that is what our application do. We will process all values and store it in a Linux file. When i look the database I am seeing as below

spend (£000's)

but after processing and stored to a file , i am seeing as below

spend (»000's)

Can you let me know how can i make my Linux to accept the pound symbol

Thanks in Advance
# 2  
Old 11-26-2012
Could also be a character set / translation issue (UTF8 ? ISO Latin ? other ?)
and/or a tty display problem ( xterm ? vt100 ? other ?)

Last edited by ctsgnb; 11-26-2012 at 01:32 PM..
# 3  
Old 11-26-2012
My database and Linux are in roman8 char set
# 4  
Old 11-26-2012
Not sure what OS, shell, etc., you're using, but this trick might work for you if you have a keyboard with a number pad (far right of the keyboard).

Code:
At the shell type:
var1="<press ALT+0187>" This will store the » symbol in var1
var2="<press ALT+0163>" This will store the £ symbol in var2

To test at the shell run the following after creating the variables:

echo "spend (»000's)" | sed -e "s|$var1|$var2|g"
spend (£000's)

To update the file run:

sed -i.BKUP -e "s|$var1|$var2|g" file

This will perform the replacement on the file and make a backup of the original (file.BKUP).

Hope this helps.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Colorful message is displayed in the terminal but not in the log file

Is there any way to print the colorful message in the terminal (which is the output of a simulation) to the log file with the same color. The colorful message at the terminal is obtained by the following codes: /////////////codes start here/////////////////////////////////////// ... (5 Replies)
Discussion started by: babunp114525
5 Replies

2. UNIX for Beginners Questions & Answers

Tee doesn't write all displayed data into text file

"Debain 9 - LXDE" I execute follow line in the bash terminal: /ts3/server/ts3server_startscript.sh start createinifile=1 | tee -a /ts3/server/key.txt The displayed output looks like follow: My key.txt file looks like follow: How can i save the whole displayed text in my file? Why does... (5 Replies)
Discussion started by: int3g3r
5 Replies

3. Shell Programming and Scripting

In Outlook spooled file data is not getting displayed properly

I am fetching a database table in spool file and send that details as a email. The Spooled file content is properly being displayed in UNIX. See Example below : ID|FILENAME |ABCDEF_DT |PROCESSED_DT |STATUS... (4 Replies)
Discussion started by: Ravi_007
4 Replies

4. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

5. Shell Programming and Scripting

Output file not displayed in the proper format

Hi am using uuencode fro attaching one report which is nothing but sql query output. But when i receive the report through attachement and when it is opened the report is not displayed in proper format. Means if the sql query has 100 rows the mail attachment report displays the report in 2... (2 Replies)
Discussion started by: weknowd
2 Replies

6. Shell Programming and Scripting

complete file name displayed instead of extension

I am running my script from "/abc/" this path and it has no ".csv files" but has a ".txt" files namely temp1.txt My script goes as below, wherein it is suppose to find files with *.txt extension and *.csv extension in another path namely "/abc/xyz/": #!/bin/ksh PATH1="/abc/xyz/" value="*.csv... (7 Replies)
Discussion started by: wolverine999
7 Replies

7. UNIX for Dummies Questions & Answers

perl - file reading - last line not displayed

Hi, Here is something that am trying with perl #! /opt/third-party/bin/perl open(fh, "s") || die "unable to open the file <small>"; @ch = (); $i = 0; while( $content = <fh> ) { if( $i <= 5 ) { push(@ch, $content); $i++; } else { $i = 1; foreach(@ch) { (8 Replies)
Discussion started by: matrixmadhan
8 Replies
Login or Register to Ask a Question