deleting certain parts of a line in perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting deleting certain parts of a line in perl
# 1  
Old 05-19-2009
deleting certain parts of a line in perl

I have a filr data.txt. Its contents are

Available labels (* indicates activated, I indicates installed, R idicates running): abc-3.0.3 def-3.0.4 xyz-3.1.2-1.0


I want to delete " Available labels (* indicates activated, I indicates installed, R idicates running):"
and keep only the values and then store those values into an array.
I am using activestate perl with windows.
# 2  
Old 05-19-2009
so what have you tried? have you read any Perl documentation regarding string substitution?
# 3  
Old 05-19-2009
summery_cherry will post a solution in a day or two Smilie
# 4  
Old 05-20-2009
I was able to get the solution for it. I just put output in differnt lines and then greped out only those lines which contained lte.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract parts of the line

I have a long list of lines in a txt file which i'm only interested to extract the list of domains like the colored ones. domain.com domain.com/page codes $.09 domain.org domain.org/page2/ codes $0.10 domain.net domain.net/page03 codes $0.05 domain.info ... (3 Replies)
Discussion started by: garfish
3 Replies

2. Shell Programming and Scripting

Split line in 4 parts

Hi Guys, I have file A.txt 1 2 3 4 5 6 7 8 9 10 11 Want Output :- 1 2 3 (3 Replies)
Discussion started by: pareshkp
3 Replies

3. Shell Programming and Scripting

Separate a hash variable into 2 parts in Perl

Dear Perl users/experts, Could somebody help me how to solve my problem, I have a hash variable that I want to convert into dot file (graphviz). I know how to convert it to dot file but I need some modification on the output of the hash variable before convert it to dot file. Eeach key of... (1 Reply)
Discussion started by: askari
1 Replies

4. Shell Programming and Scripting

Incrementing parts of ten digits number by parts

I have number in file which contains date and serial number: 2013101000. The last two digits are serial number (00). So maximum of serial number is 100. After reaching 100 it becomes 00 with incrementing 10 which is day with max 31. after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies

5. UNIX for Dummies Questions & Answers

Deleting a pattern in UNIX without deleting the entire line

Hi I have a file: r58778.3|SOURCES={KEY=f665931a...,fw,221-705}|ERRORS={16_1:T,30_1:T,56_1:C,57_1:T,59_1:A,101_1:A,115:-,158_1:C,186_1:A,204:-,271_1:T,305:-,350_1:C,368_1:G,442_1:C,472_1:G,477_1:A}|SOURCE_1="Contig_1092402550638"(f665931a359e36cea0976db191ff60ff09cc816e) I want to retain... (15 Replies)
Discussion started by: Alyaa
15 Replies

6. UNIX for Dummies Questions & Answers

Help with deleting some parts from text file

Hi all, I have a fat file which contains something like this: ************************************************ blahblahblah blahblahblah Myobject1 HOME ( homecontents01 ( some junk; ) home contents02( some junk; ) ... (7 Replies)
Discussion started by: newboy
7 Replies

7. Shell Programming and Scripting

perl, splitting out specific parts of the string

Hi there, I have an output from a command like this # ypcat -k netgroup.byuser| grep steven steven.* users_main,users_sysadmin,users_global,users_backup_team and wanted to pull the 'users' netgroups returned into a perl array, that will look like this users_main... (2 Replies)
Discussion started by: rethink
2 Replies

8. Shell Programming and Scripting

[ask]break line number into several parts

hlow all, i have file with wc -l file.txt is 3412112 line number so I want to break these files into several parts with assumsi line 1-1000000 will be create part1.txt and 1000001-2000000 will create part2.txt and 2000001-3000000 will create part3.txt and 3000001-3412112 will create... (5 Replies)
Discussion started by: zvtral
5 Replies

9. Shell Programming and Scripting

deleting particular lines and moving a line up using perl/sed

Hi, I need convert a dump file in the following format : (please note that line numbers are provided for easy look) Original file: 1 2007-10-2482.90 No trade 0 0.00 100000.00 2 100000.00 3 0.00 4 HOLD 5 2007-10-2589.75 Bought 1114 1114 100000.00 0.00 ... (5 Replies)
Discussion started by: sabyasm
5 Replies

10. UNIX for Dummies Questions & Answers

removing parts of a line with SED

hi, i'm trying to erase all the characters after, and including, the first test test Output: test1 test2 test3 this is what I tried, but didn't work sed "s/*//" file > testfilename any suggestions? thanks, gammmaman (2 Replies)
Discussion started by: gammaman
2 Replies
Login or Register to Ask a Question