On £ symbol


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting On £ symbol
# 1  
Old 12-12-2013
On £ symbol

Hi All,
How do i represent £ symbol in unix and how to retain £ symbol in file.

Thanks in Advance
# 2  
Old 12-12-2013
There is _always_ a way.
Longhand using builtins.
OSX 10.7.5, _bash_ terminal...
Code:
#!/bin/sh
echo "UK currency sign is £ as in £100.25p." > /tmp/pound.txt
read pound < /tmp/pound.txt
length=$[ ( ${#pound} - 1 ) ]
newtext=""
for subscript in $( seq 0 $length )
do
	if [ "${pound:$subscript:1}" == "£" ]
	then
		newtext="$newtext#"
	else
		newtext="$newtext${pound:$subscript:1}"
	fi
done
echo ""
echo "File _pound_ unchanged..."
echo "$pound"
echo ""
echo "Variable _newtext_ showing # sign in its place..."
echo "$newtext"
echo ""

Result...
Code:
Last login: Thu Dec 12 07:43:53 on ttys000
AMIGA:barrywalker~> chmod 775 pound.sh
AMIGA:barrywalker~> ./pound.sh

File _pound_ unchanged...
UK currency sign is £ as in £100.25p.

Variable _newtext_ showing # sign in its place...
UK currency sign is # as in #100.25p.

AMIGA:barrywalker~> _

# 3  
Old 12-12-2013
Depending on your locale setting, it may be mapped to some character above 128. If using the utf8 char set / locale, it is the two byte char \302\243 or 0xc2 0xa3 or M-BM-# (M = Meta). It depends on your keyboard driver/keyboard mapping if it is immediately available from your keyboard.
# 4  
Old 12-13-2013
After loading data into text file through Datastage jobs, in Unix prompt I'm seeing pound symbol representation as £ whereas in Datastage when I view data I'm seeing value as £ and  value is not seen in tool.

What is this representation of pound symbol called?

Thanks in Advance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Undefined Symbol

When I try to link a .so file I get the undefined symbol error. Though I have the library file in my system. The compile and linking commands used are as follows g++ -m64 -g -Wall -I./include -c dxl_sample.c g++ -o firstprogram -m64 -g -Wall -I./include -Bdynamic... (1 Reply)
Discussion started by: Ranadeep Ghosal
1 Replies

2. Programming

Undefined Symbol

When I try to link a .so file I get the undefined symbol error. Though I have the library file in my system. The compile and linking commands used are as follows g++ -m64 -g -Wall -I./include -c dxl_sample.c g++ -o firstprogram -m64 -g -Wall -I./include -Bdynamic... (1 Reply)
Discussion started by: Ranadeep Ghosal
1 Replies

3. UNIX for Dummies Questions & Answers

caret symbol

Hi! I need to know where is the caret symbol (^) on the keyboard. I press Shift+6 and does not appear!! Thank you very much. Removed email address - all should benefit of an answer. (1 Reply)
Discussion started by: labultet
1 Replies

4. Shell Programming and Scripting

Words after / symbol

Hi, I have the following directory: /home/dragon/websphere/cells/profile/imp/001/ I want to put this in a shell script and get the values before and after cells by removing the '/' Any idea how to make this possible? Regards, Dinesh (6 Replies)
Discussion started by: dbashyam
6 Replies

5. Shell Programming and Scripting

Symbol reference

Hi, test -d .ssh || mkdir .ssh && chmod 700 .ssh The command has couple of symbols, could someone redirect me to the link, where i can understand their significance. Thanks, John (1 Reply)
Discussion started by: john_prince
1 Replies

6. Solaris

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

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

7. Shell Programming and Scripting

Append with TM symbol

I have a file with delimiter ";" and 2 columns for eg: Transparent; ScotchPro™ If you see carefully you can see a special character "TM" at the end of data which is not showing up when I read the data in a regular sequential file. Did anyone anytime tackle this kind of Data. Please advice.... (1 Reply)
Discussion started by: ganesh123
1 Replies

8. UNIX for Dummies Questions & Answers

The > symbol

Hi guys, Im new to unix; I have a problem at hand. Somehow at the terminal, I lost the command prompt, instead I get a ">" symbol. Anything I type in does me no good. What do you recommend? Thank you for your help. (3 Replies)
Discussion started by: csb
3 Replies

9. Programming

no symbol table

Hi@all, I try to compile c code on hpux 11.11 pa-risc 2 with gcc (32bit). I compile with the option -g, so that I get the symbol table, but it is not available. Does someone knows something on this? thx (2 Replies)
Discussion started by: Dom_Cyrus
2 Replies

10. UNIX for Dummies Questions & Answers

unresolved symbol ???

when I make ncftp 111.111.1.2 I just get problems like ... /usr/lib/dld.sl unresolved symbol:inet_ntop (code) does anybody know what is the problem and how to solve this? thx.. (2 Replies)
Discussion started by: svennie
2 Replies
Login or Register to Ask a Question