Sponsored Content
Top Forums Shell Programming and Scripting Sed: Remove whitespace between two strings Post 302490972 by glev2005 on Wednesday 26th of January 2011 10:23:21 AM
Old 01-26-2011
Sed: Remove whitespace between two strings

I have a 13 number string, some whitespace, and then /mp3.
I need to join them. Everyline that I need this for begins with "cd" (without the quotes).


What it looks like now:
Code:
cd media/Audio/WAVE/9781933976334    /mp3

What I want my output to be:
Code:
cd media/Audio/WAVE/9781933976334/mp3

The 13 number string is always different but always begins with 978.

Please use sed unless there is something much better for this task.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove whitespace and test

Hi, I know removing whitespaces I can found so many threads to read how it works and i did it, but my problem isn't solved... I have in my script a variable $1 which can contains a text like " Channel ". No I want to check if $1 contains the word Channel, but I don't know how many... (4 Replies)
Discussion started by: bensky
4 Replies

2. Shell Programming and Scripting

sed : remove whitespace

I'm trying to remove the whitespace at the end of each line of a text file in ksh. Im using sed s/ $//g' file1.txt > file2.txt It's not working. Any clues? (3 Replies)
Discussion started by: b.hamilton
3 Replies

3. UNIX for Dummies Questions & Answers

remove whitespace

I combined 2 files using the paste command. It gave me something like this: 123445 ,AABBNN 22344 ,BBVVMM I want to remove the whitespace between the end of string 1 and the comma (there is more blank space than my post is showing). Would I... (2 Replies)
Discussion started by: nickg
2 Replies

4. Shell Programming and Scripting

sed: remove characters between and including 2 strings

I have the following line: 4/23/2010 0:00:38.000: Copying $$3MSYDDC02$I would like to use sed (or similiar) to remove everthing between and including $ that appears in the line so it ends up like this. 4/23/2010 0:00:38.000: Copying 3MSYDDC02I have been trying these but i'm really just... (5 Replies)
Discussion started by: jelloir
5 Replies

5. Shell Programming and Scripting

Remove strings within range using sed

Hey folks I have a big file that contains junk data between the tags <point> and </point> and I need to delete it (including `<point>' and `</point>'). i.e. a = 1 <point> 123123 2342352 234231 234256 </point> print a needs to become a = 1 print a I'm certain that this is a... (10 Replies)
Discussion started by: ksk
10 Replies

6. Shell Programming and Scripting

any savant ? using AWK/SED to remove newline character between two strings : conditional removal

I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex ) ---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1 -- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies

7. Shell Programming and Scripting

awk or sed script to remove strings

Below am trying to separate FA-7A:1, In output file it should display 7A 1 Command am using Gives same output as below format: 22B7 10000000c9720873 0 22B7 10000000c95d5d8b 0 22BB 10000000c97843a2 0 22BB 10000000c975adbd 0 Not showing FA ports as required format... (5 Replies)
Discussion started by: aix_admin_007
5 Replies

8. UNIX for Dummies Questions & Answers

[Solved] How remove leading whitespace from xml (sed /awk?)

Hi again I have an xml file and want to remove the leading white space as it causes me issues later in my script I see sed is possible but cant seem to get it to work I tried sed 's/^ *//' file.xml output <xn:VsDataContainer id="1U104799" modifier="update"> ... (10 Replies)
Discussion started by: aniquebmx
10 Replies

9. Shell Programming and Scripting

USING sed to remove multiple strings/words from a line

Hi I use sed comnand to remove occurance of one workd from a line. However I need to removed occurance of dufferent words in ne line. Original-1 Hi this is the END of my begining Comand sed s/"END"/"start"/g Output-1 Hi this is the start of my beginig But I have more... (9 Replies)
Discussion started by: mnassiri
9 Replies

10. UNIX for Beginners Questions & Answers

How to append strings with whitespace?

Hi, Need help. This seems simple but I tried many things but failed to get what I wanted. Below is the input file: ... (7 Replies)
Discussion started by: bunny_merah19
7 Replies
NORMALIZE-MP3(1)					      General Commands Manual						  NORMALIZE-MP3(1)

NAME
normalize-mp3 - adjust levels of mp3 or ogg files by running normalize-audio(1), then re-encoding SYNOPSIS
normalize-mp3 [OPTION]... [FILE]... normalize-ogg [OPTION]... [FILE]... DESCRIPTION
Normalize volume of mp3 or ogg files by decoding, running normalize, and re-encoding. This requires as much extra disk space as the largest mp3 or ogg file, decoded. Note that for batch and mix mode, all files must be decoded, so there must be enough disk space for the decoded copies of all specified mp3 and ogg files. --ogg Convert files to OGG, regardless of original format --mp3 Convert files to MP3, regardless of original format --bitrate BR Set bitrate of re-encoded file (default 128) --tmpdir TMP Put temporary WAV files in temp directory TMP --notags Do not copy ID3 or OGG tags to the output file The following four options may be used to set the encoder and decoder commands for mp3 and ogg vorbis. %m is expanded to the name of the mp3 or vorbis file, %w expands to the name of the temporary WAV file, and %b expands to the bitrate, as specified by the --bitrate option. Run normalize-mp3 with no arguments to see the default values. --mp3encode=X mp3 encoder --mp3decode=X mp3 decoder --oggencode=X ogg vorbis encoder --oggdecode=X ogg vorbis decoder -h Display this help and exit. -V Display version information and exit. These arguments are passed as arguments to normalize-audio. Run "normalize-audio --help" for more info. -a AMP -g ADJ -n -T THR -b -m -v -q REPORTING BUGS Report bugs to <chrisvaill@gmail.com>. SEE ALSO
The normalize-audio(1) Man page NOTES
This page was provided by Eduardo Macan <macan@debian.org> September 2001 NORMALIZE-MP3(1)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy