Sponsored Content
Top Forums Shell Programming and Scripting adding new line after finding specific text Post 302323372 by vidyadhar85 on Sunday 7th of June 2009 09:09:19 AM
Old 06-07-2009
you did a typo error look closely what radoulove written
full code is not written in single line
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding Text To each line of a file

How would I add text to the beginning of each line in a text file in a script right after the file is created from another text file. (4 Replies)
Discussion started by: cubs0729
4 Replies

2. Shell Programming and Scripting

Adding a columnfrom a specifit line number to a specific line number

Hi, I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers. To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies

3. Shell Programming and Scripting

Adding specific text and spaces to each line in a text file

Hi, I wanted to add specific text to each row in a text file containing three rows. Example: 0 8 7 6 5 5 7 8 9 0 7 9 7 8 9 0 1 2 And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this: 21 0 8 7 6 5 5 7 8... (4 Replies)
Discussion started by: hertingm
4 Replies

4. Shell Programming and Scripting

add newline in file after finding specific text

Hi All, I am tring to insert a newline with "/" in a text file whenever there is the text "end;" right now I have inside file: . . end; I want to have: . . end; / I tried doing the following within the file :g/^end;/s//end; \/ / (4 Replies)
Discussion started by: jxh461
4 Replies

5. Shell Programming and Scripting

[bash help]Adding multiple lines of text into a specific spot into a text file

I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it. For example, Here is a portion of a zone file. IN NS ns1.domain.tld. IN NS ns2.domain.tld. IN ... (2 Replies)
Discussion started by: cdn_humbucker
2 Replies

6. Shell Programming and Scripting

help with finding text and deleting line

HI All, I need to search for a particular pattern input by the user in order to delete the line. My username.txt has username@email.com:John:149.0.3.4:1 username1@email.com:Harry:149.0.3.4:1 username1@email.net:Alex:149.0.3.4:1 username1@email.edu:Nemo:149.0.3.4:1 The program i written ... (3 Replies)
Discussion started by: ichar
3 Replies

7. UNIX for Dummies Questions & Answers

Adding tags to a specific column of a space delimited text file

I have a space delimited text file with two columns. I would like to add NA to the first column of the text file. Input: 19625 10.4791768259 19700 10.8146489183 19701 10.9084026759 19702 10.9861346978 19703 10.9304364984 Output: NA19625 10.4791768259 NA19700 10.8146489183... (1 Reply)
Discussion started by: evelibertine
1 Replies

8. Shell Programming and Scripting

Adding text to the end of the specific line in a file(only to the first occurrence of it)

Hi, I want to add a text to the end of the specific line in a file. Now my file looks like this: 999 111 222 333 111 444 I want to add the string " 555" to the end of the first line contaning 111. Moreover, I want to insert a newline after this line containg the "000" string. The... (8 Replies)
Discussion started by: wenclu
8 Replies

9. Shell Programming and Scripting

Adding a text in the beginning of a line

Hi, I am doing something like below: cat file1>file3and cat file2>>file3 I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record. cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies

10. UNIX for Beginners Questions & Answers

Adding a new line after a specific line with sed

Hi All, My requirement is to add a specific line in a file after a certain line that contains 'setenv' the existing code is like setenv SEQFILES "/ConvWrk/inteng03/alltars/bnymais1" LIBDEF scope='JOB' type='PGM' dataset='SUNAR.PJ90000P.JOBLIB'... (5 Replies)
Discussion started by: gotamp
5 Replies
MP3::Tag::File(3pm)					User Contributed Perl Documentation				       MP3::Tag::File(3pm)

NAME
MP3::Tag::File - Module for reading / writing files SYNOPSIS
my $mp3 = MP3::Tag->new($filename); ($title, $artist, $no, $album, $year) = $mp3->parse_filename(); see MP3::Tag DESCRIPTION
MP3::Tag::File is designed to be called from the MP3::Tag module. It offers possibilities to read/write data from files via read(), write(), truncate(), seek(), tell(), open(), close(); one can find the filename via the filename() method. parse_filename() ($title, $artist, $no, $album, $year) = $mp3->parse_filename($what, $filename); parse_filename() tries to extract information about artist, title, track number, album and year from the filename. (For backward compatibility it may be also called by deprecated name read_filename().) This is likely to fail for a lot of filenames, especially the album will be often wrongly guessed, as the name of the parent directory is taken as album name. $what and $filename are optional. $what maybe title, track, artist, album or year. If $what is defined parse_filename() will return only this element. If $filename is defined this filename will be used and not the real filename which was set by MP3::Tag with "MP3::Tag->new($filename)". Otherwise the actual filename is used (subject to configuration variable "decode_encoding_filename"). Following formats will be hopefully recognized: - album name/artist name - song name.mp3 - album_name/artist_name-song_name.mp3 - album.name/artist.name_song.name.mp3 - album name/(artist name) song name.mp3 - album name/01. artist name - song name.mp3 - album name/artist name - 01 - song.name.mp3 If artist or title end in "(NUMBER)" with 4-digit NUMBER, it is considered the year. title() $title = $mp3->title($filename); Returns the title, guessed from the filename. See also parse_filename(). (For backward compatibility, can be called by deprecated name song().) $filename is optional and will be used instead of the real filename if defined. artist() $artist = $mp3->artist($filename); Returns the artist name, guessed from the filename. See also parse_filename() $filename is optional and will be used instead of the real filename if defined. track() $track = $mp3->track($filename); Returns the track number, guessed from the filename. See also parse_filename() $filename is optional and will be used instead of the real filename if defined. year() $year = $mp3->year($filename); Returns the year, guessed from the filename. See also parse_filename() $filename is optional and will be used instead of the real filename if defined. album() $album = $mp3->album($filename); Returns the album name, guessed from the filename. See also parse_filename() The album name is guessed from the parent directory, so it is very likely to fail. $filename is optional and will be used instead of the real filename if defined. comment() $comment = $mp3->comment($filename); # Always undef genre() $genre = $mp3->genre($filename); # Always undef perl v5.14.2 2009-11-28 MP3::Tag::File(3pm)
All times are GMT -4. The time now is 03:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy