![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ftp :bin and ascii | smehra | UNIX for Advanced & Expert Users | 1 | 03-08-2005 06:22 PM |
| ascii to dbf HELP! | gseyforth | UNIX for Advanced & Expert Users | 1 | 12-10-2004 11:58 AM |
| ascii | melkor | UNIX for Dummies Questions & Answers | 3 | 12-12-2003 06:33 PM |
| Ascii To Hex | augustinep | UNIX for Dummies Questions & Answers | 1 | 04-26-2002 11:03 AM |
| ascii for EOF ??? | strpeski | UNIX for Dummies Questions & Answers | 3 | 03-16-2002 05:33 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
URL to ASCII
I am writing a small script to help me clean out my music (itunes) that has somehow doubled every song. Using the itunes.xml file, I have been able to create a simple list of all the files. The problem is itunes uses URL style formatting, ex. %20 for spaces. I used sed to convert %20 to a space only to find out every special character(!, ?, etc.) is like this. Is there a quick way to convert all URL (hexadecimal I believe) to regular ASCII? Thanks for the help.
|
| Forum Sponsor | ||
|
|
|
|||
|
Thanks, that worked great. I hope you can help me out with one more thing. I have a text file that I am trying to filter. Here is part of my script:
Code:
while read URL
do
echo $URL | printf ${URL//%/\\x} > $itunes_file
done < $itunes_file
/Volumes/Diego_External/Music/Jewel/VH-1 Storytellers/06 Who Will Save Your Soul 1.mp3 /Volumes/Diego_External/Music/Jewel/Women & Songs %5BRhino%5D/03 Intuition 1.mp3 After I run it, I get: /Volumes/Diego_External/Music/Jewel/VH-1 Thanks again. |
|
|||
|
That fixed it, along with changing to >> not >. Unfortunately, that wasn't the only problem. It still has %5B, %5D, etc that aren't converted with the script. I think at this point, it might be easier to simply search and replace with a text editor. Thanks Ripat.
|