Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: lohith.dutta
1,256
Posted By bartus11
Right. Brackets' escapes are unnecessary in Perl...
Right. Brackets' escapes are unnecessary in Perl regexes:perl -pe 's/^\[.*- (.*.mp3)/\1/' file
1,256
Posted By Corona688
I don't think you need to escape ( in a perl...
I don't think you need to escape ( in a perl regex. But perl -e doesn't work that way, it expects a perl program, not a sed statement.

Your regex looks more complicated than it needs to be,...
1,256
Posted By bartus11
Try:perl -pe 's/^\[.*- \(.*.mp3\)/\1/' file
Try:perl -pe 's/^\[.*- \(.*.mp3\)/\1/' file
5,788
Posted By Corona688
That is a useless use of cat...
That is a useless use of cat (http://partmaps.org/era/unix/award.html), and won't work since you're not sorting on the right column.

Perhaps awk isn't needed though, just sort -rn -k 2 < filename...
4,243
Posted By balajesuri
perl -e...
perl -e '@x=(3,6,2,8,1);@y=(8,2,11,7,9);for($i=0;$i<=$#x;$i++){$sum+=($x[$i]+$y[$i])};print $sum'
Showing results 1 to 5 of 5

 

Featured Tech Videos

All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy