![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sed-Special character replacement | usshell | Shell Programming and Scripting | 3 | 05-22-2008 11:06 AM |
| sed and special character in data | MizzGail | Shell Programming and Scripting | 3 | 01-23-2008 03:45 PM |
| Special character in my file | Ryan2786 | UNIX for Dummies Questions & Answers | 3 | 07-06-2007 12:35 AM |
| Issue with dispaly of special character like 'TM' | vbehal | UNIX for Advanced & Expert Users | 0 | 11-13-2005 04:15 AM |
| special character ? | mile1982 | High Level Programming | 1 | 10-19-2004 09:15 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
i had a shell script writing a xml file. I need to use "& # 163;" instead of "£", and replace others characters like: > to > , and so on.. Anyone know how to convert the character automatically? my script as below:
do # GET FEED REC SQL2="SELECT A.*, B.subject FROM feed_details A, feed_category B where A.status=0 and A.feedCategoryId=B.id limit 1" #FEED="$(/usr/bin/mysql -N -u${DB_USER} -p${DB_PWD} -h${DB_HOST} ${DB_NAME} -e "${SQL2}")" FEED="$(/usr/bin/mysql -N -u${DB_USER} -p${DB_PWD} ${DB_NAME} -e "${SQL2}")" arrayDB=($FEED) echo " <item>" echo " <guid isPermaLink="false">SMS${arrayDB[$dbId]}-${DB_CUR_DATE}</guid>" echo " <pubDate>${arrayDB[$dbPubishDate]}</pubDate>" echo " <dc:subject>${arrayDB[$dbSubject]}</dc:subject>" echo " <dc:description>SMS</dc:description>" echo " <dc:type>Text</dc:type>" echo " <dc:format>text/plain</dc:format>" echo " <description>${arrayDB[$dbDescription]}</description>" echo " </item>" # UPDATE STATUS TO 1 (DONE) SQL3="UPDATE feed_details SET status=1 WHERE id='${arrayDB[dbId]}' limit 1" done I am trying to convert the value from DB to xml character set, £--> "& # 163;" Anyone can help??? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|