Sponsored Content
Top Forums Shell Programming and Scripting read a string from its end to its start and stop when you find a specific character Post 302449831 by hakermania on Tuesday 31st of August 2010 05:14:19 PM
Old 08-31-2010
The fact that I am 3 years now to Unix and there are sooo many unknows commands to me is hilarious.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cut from a particular character to the end of the string

Hi All, I have a string like "9633C01302_2". I need to extract the number(02) after "13" and before "_" and the number coming after "13" and before "_" is not constant, it keeps on changing... Can some one plz help me wth the command.. i tried this echo "9633C01302_2" | cut -d'_' -f1 ..But... (2 Replies)
Discussion started by: grajesh_955
2 Replies

2. Shell Programming and Scripting

String as both start and end anchors in awk

Not sure if the title of this thread makes sense, but hopefully my explanation will. I'm using awk to print some stats from an apache accesslog. I would like to specify the regexp condition where only the two root pages of "index.html" and "/" are counted in my results. What I can't figure out... (3 Replies)
Discussion started by: picassolsus
3 Replies

3. UNIX for Dummies Questions & Answers

Extract a specific number from an XML file based on the start and end tags

Hello People, I have the following contents in an XML file ........... ........... .......... ........... <Details = "Sample Details"> <Name>Bob</Name> <Age>34</Age> <Address>CA</Address> <ContactNumber>1234</ContactNumber> </Details> ........... ............. .............. (4 Replies)
Discussion started by: sushant172
4 Replies

4. Shell Programming and Scripting

Appending string, variable to file at the start and string at end

Hi , I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;" ... (4 Replies)
Discussion started by: Vaddadi
4 Replies

5. UNIX for Dummies Questions & Answers

Find Quarter Start and End Dates

Dear Members, Depending on the current date i should find out the start and end dates of the quarter. ex: Today date is 14-Nov-2011 then Quarter start date should be Oct 1 2011 and Quarter End date should be Dec 31 2011. How can i do this? Thanks Sandeep (1 Reply)
Discussion started by: sandeep_1105
1 Replies

6. Shell Programming and Scripting

how to specify start and stop of a search string

I am trying to extract a string from a line of text. Currently I am using grep -o 'startofstring(.........' The string is not always the same size. The string I'm trying to extract starts with 'test(' ends with ')'. ex "blah,blah,blah,test(stringoftext),blah blah" How do I... (4 Replies)
Discussion started by: jeepguy
4 Replies

7. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

8. Shell Programming and Scripting

Read command stop on either EOF or a specific line

I'm trying to stop reading a file until the end of the file is reached or a defined delimiter line is reached. Some how I need to test the fail state of the last 2 commands, not just the last command. echo -e "hello\ngoodbye\n####\ntesting" | while read line; ]; do echo "$line"; done hello... (4 Replies)
Discussion started by: Michael Stora
4 Replies

9. Shell Programming and Scripting

Find between lines start and end: awk with bash variables

I have a file as follows: 0 1056 85540 414329 774485 1208487 1657519 2102753 2561259 3037737 3458144 3993019 4417959 4809964 5261890 5798778 6254146 I want to find all lines between a specified start and end tag. (6 Replies)
Discussion started by: jamie_123
6 Replies

10. Shell Programming and Scripting

Search a String between start and end of a block in a file

Hi, I have a scenario where I want to display the output based on the pattern search between the start and end of a block in a file, we can have multiple start and end blocks in a file. Example give below, we need to search between the start block abc and end block def in a file, after that... (5 Replies)
Discussion started by: G.K.K
5 Replies
tagmp3(1)							    User manual 							 tagmp3(1)

NAME
tagmp3 - manipulate ID3v1 tags SYNOPSIS
tagmp3 [ -n ] mode [ format ] [ file ] ... DESCRIPTION
tagmp3 allows you to set and remove ID3v1 tags from mp3 files. Additionaly move mode can be used to move mp3 files according to their ID3v1 tag. An ID3v1 tag is a chunk of extra informations such as artist name, album and genre. ID3v1 tags are displayed by most mp3 players. MODE
show show file's ID3v1 tag. set sets file's ID3v1 tag according to format. move move file to a destination based on FORMAT. del remove file's ID3v1 tag if any. list displays numeric music genres along with their meaning. -h print a (not so) short help message. -v print version and exit. OPTIONS
-n Show what will be done, don't alter any file. FORMAT STRING
The format string is a character string composed of zero or more directives: ordinary characters (not %), which are not interpreted and conversion specifications, each of which results in the corresponding ID3v1 tag field substitution. Each conversion specification is introduced by the character %. The following lines describes each conversion specification along with its associated ID3v1 field. Special sequence %% is substituted with a single %. %A Artist Name %a Album Name %t Song Title %T Track Number %y Year %g Genre %c Comments format string for set mode For set mode the format string is a list of ID3v1 fields followed by a ':' (next chars are the field value) or a '?' (ask user for field value) example: tagmp3 set "%A:Pink Floyd %a:The Wall %t? %T?" *.mp3 For each mp3 of this directory, sets the artist name to Pink Floyd and the album to The Wall. For each file ask for the title and the track number. Leave the other fields untouched. Be aware that genre field require a numeric value. Known genres can be dis- played with the list mode. format string for move mode The format string is the destination path where each field identifier is substituted with the tag value. example: tagmp3 move "/home/foo/mp3/%A/%a/%T-%t.mp3" *.mp3 with the set example above will move all mp3 to "/home/foo/mp3/Pink Floyd/The Wall/{track}-{title}.mp3" If you prefer the "flat" naming scheme, you will use something like tagmp3 move "%A-%t.mp3" *.mp3 NOTES
move mode never overwrite files. move mode creates intermediate directories specified in the format string. Each directory creation is to be confirmed by the user. ID3v2 tags are not supported so far. If a file can't be moved ( wrong file type, ID3v1 tag absent or blank field , ...) then it is left untouched. Fake mp3 (i.e. Wave file with .mp3 extension) are moved into "fake-mp3/" directory in move mode. set mode refuses to tag them since this would add noisy artifact at the end of the song. BUGS
Plenty of :) For move mode, source and destination must reside on the same file system / partition. AUTHOR
Laurent Alacoque <laureck@users.sourceforge.net> CopyLeft 2001 Bugs, patch, infos, new releases, girls, money go to : http://mpgtx.sourceforge.net/ Linux APRIL 2001 tagmp3(1)
All times are GMT -4. The time now is 11:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy