Sponsored Content
Full Discussion: replace %20 in xml file
Top Forums UNIX for Dummies Questions & Answers replace %20 in xml file Post 302512299 by locoroco on Saturday 9th of April 2011 10:16:05 AM
Old 04-09-2011
Here I have removed the %20:
Code:
echo /Users/imac1/Music/iTunes/iTunes 20Media/Music/The%20Rolling%20Stones/Forty%20Licks%20%5BDisc%202%5D/2-13%20Keys%20To%20Your%20Love.mp3 | sed 's/%..//g'

output:
/Users/imac1/Music/iTunes/iTunes 20Media/Music/TheRollingStones/FortyLicksDisc2/2-13KeysToYourLove.mp3

replaced with eg. underscore:

Code:
echo /Users/imac1/Music/iTunes/iTunes  20Media/Music/The%20Rolling%20Stones/Forty%20Licks%20%5BDisc%202%5D/2-13%20Keys%20To%20Your%20Love.mp3  | sed 's/%../_/g'

output:
/Users/imac1/Music/iTunes/iTunes 20Media/Music/The_Rolling_Stones/Forty_Licks__Disc_2_/2-13_Keys_To_Your_Love.mp3
This User Gave Thanks to locoroco For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

serach and replace file name in the path in a remote xml file

hi every one , here is my problem !! i have to run my script from an account and update the result in a xml file located on a different account. i use existing ssh keys to do it remotely for example the tags looks like this <PropertyValueList... (1 Reply)
Discussion started by: kiranreddy1215
1 Replies

2. Shell Programming and Scripting

replace nth value in xml file

Hi all, I have application.xml file with following content <dependency> <groupId>fr.orange.portail.ear</groupId> <artifactId>_AdminServicesEAR</artifactId> <version>1.0.0-20080521.085352-1</version> <type>ear</type> </dependency> <dependency> ... (4 Replies)
Discussion started by: subin_bala
4 Replies

3. Shell Programming and Scripting

Search for word in a xml file and replace it with something else

Hello Unix Users, I am very new to Unix so I am not sure how do I do the following. I need a script such that when I type the following in the command prompt > . scriptName.sh wordToBeReplaced DirectoryLocation will find the word someword located in a somefile.xml in DirectoryLocation... (8 Replies)
Discussion started by: 5211171
8 Replies

4. Shell Programming and Scripting

Search and replace in xml file using awk..

Hi All, I have xml file,i am tring to use awk to search pattern as: <Password>x</Password> and Replace with: <Password>y</Password> please any one can help to solve this using awk and awk only. (4 Replies)
Discussion started by: islam2666
4 Replies

5. Shell Programming and Scripting

How can i use sed to replace a keyword in an xml file?

Hello Unix gurus! I'm a unix newbie. Can I use sed to replace a keyword in an xml file and convert this keyword with an output of a unix cat command? for example: <test>keyword</test> and temp.txt = hello! I would like to replace "keyword" with the output of "cat temp.txt". I think... (6 Replies)
Discussion started by: 4dirk1
6 Replies

6. Shell Programming and Scripting

Find/Replace in XML file

I am not sure how to approach this find/replace using a shell script. Any help or guidance appreciated. I want to find this: <objects/> <thumb>thumb_0001.jpg</thumb> <preview>preview_0001.jpg</preview> And replace with something like this: <objects>... (1 Reply)
Discussion started by: jimraynor
1 Replies

7. Shell Programming and Scripting

Need to replace particular content in a xml file

Hi, My requirement is to find a text and replace it with another in a XML file. I am new to Unix,Please provide some suggestion to achieve. Find: <Style ss:ID="ColumnHeader1"> Replace with: <Style ss:ID="ColumnHeader1"> <Borders> <Border ss:Position="Bottom"... (4 Replies)
Discussion started by: cnraja
4 Replies

8. Shell Programming and Scripting

Replace the .txt file between two strings in XML file

Hi i am having XML file with many number of lines,I need to replace between two strings with .txt file using awk. For ex <PersonInfoShipTo ------------------------------ /> My requirement is to replace the content between <PersonInfoShipTo ------------------------------ /> help me. Thanks... (9 Replies)
Discussion started by: Padmanabhan
9 Replies

9. Red Hat

How to replace Ip address in .xml file through shell script?

I have one .xml file. which contains the following line. <ParamString StringId="PortAddress" StringValue="172.27.166.170" /> <ParamString StringId="PortAddress" StringValue="172.27.166.171" /> <ParamString StringId="PortAddress" StringValue="172.27.166.202" /> <ParamString... (9 Replies)
Discussion started by: Anjan Ganguly
9 Replies

10. Shell Programming and Scripting

Replace a string in a xml file

Hello, I have below xml file, I want to find line default-value and replace the string within quotes followed by default-value "moni/Websphere/". Replace moni/Websphere/ with monitor/AMQ/ <monitor> <name>WebsphereMqMonitor</name> <type>managed</type> <argument... (4 Replies)
Discussion started by: prince1987
4 Replies
Music Player Daemon(1)					      General Commands Manual					    Music Player Daemon(1)

NAME
MPD - A daemon for playing music SYNOPSIS
mpd [options] [CONF_FILE] DESCRIPTION
MPD is a daemon for playing music. Music is played through the configured audio output(s) (which are generally local, but can be remote). The daemon stores info about all available music, and this info can be easily searched and retrieved. Player control, info retrieval, and playlist management can all be managed remotely. MPD searches for a config file in ~/.mpdconf then /etc/mpd.conf or uses CONF_FILE. Read more about MPD at <http://www.musicpd.org/>. OPTIONS
--help Output a brief help message. --kill Kill the currently running mpd session. The pid_file parameter must be specified in the config file for this to work. --no-daemon Don't detach from console. --stderr Print messages stderr. --verbose Verbose logging. --version Print version information. FILES
~/.mpdconf User configuration file. /etc/mpd.conf Global configuration file. SEE ALSO
mpd.conf(5), mpc(1) BUGS
If you find a bug, please report it at <http://www.musicpd.org/mantis/bug_report_page.php>. AUTHORS
Warren Dukes <warren.dukes@gmail.com> Special thanks to all the people that provided feedback and patches. Music Player Daemon(1)
All times are GMT -4. The time now is 05:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy