Hello,
I have some video files containing numbers and characters . To tell the problem shortly, due to a limitation, I am unable create a playlist regularly changing on a daily basis with the command shuffle....So I decided to rename filenames, just a replacement of first five numbers randomly.
myfiles:
Number creation is okay with above command..
Expected output:
How can I do it? Is there a command to separate numeric / alphanumeric fields ?
i have several thousand files and in subdirs that are named
file.46634.txt
budget.75346.pdf
etc
i want to remove the number but retain the extension.
it is always a 5 digit.
thanks. (6 Replies)
Hi All,
Can you please help me.
The situation is like this. There are many different file name in this directory.
I have to grep all the file that the name start with "PTWO" and rename it to COM with the current date.
This is the script that I have done and it hit an... (16 Replies)
Hi, I am pretty new to this.
I have a condition where in I want to replace all files within a folder. All filenames with character "abc" would need to replaced with "xyz".
eg:
helloabcworld-->helloxyzworld
helloworld-->helloworld
...
...
Thanks in advance. (6 Replies)
In the Directory all the Files are following format.
Filename_yyyymmdd_numbers.txt
eg.
file_name_20120106_015802.txt .
I want to write the Shell script to rename all the file to
file_name.txt.in the directory.
Thanks
Mani (5 Replies)
dear all,
i have .dat files named as:
34.dat
2.dat
16.dat
107.dat
i would like to sort them by their filenames as:
2.dat
16.dat
34.dat
107.dat
i have tried numerous combinations of sort and ls command (in vain) to obtain :
107.dat
16.dat
2.dat
34.dat (1 Reply)
Hi all
Thanks in advance...........
Please help me for this issue............
I have a file it has 11 records . I used the command like ....
>$ wc -l file
11 file
I'm getting output like 11 file (no.of records along with filename)
here my requirement is, I want to display only... (3 Replies)
i have a file called 'test.txt' which contains the below data.
abc123
123445
123abc
23224q
From the above data, i want to display the line which contains only numeric . So i have tried the below commands with sed
sed -n '/^$/p' test.txt
sed '/^$/!d' test.txt
But it... (4 Replies)
Hi,
I have a list of log files as follows:
name_date_0001_ID0.log
name_date_0001_ID2.log
name_date_0001_ID1.log
name_date_0002_ID2.log
name_date_0004_ID0.log
name_date_0005_ID0.log
name_date_0021_ID0.log
name_date_0025_ID0.log
.......................................... (4 Replies)
I am using awk to sum up all amounts and at end print total.
input:
10,250.00
20,103.15
expected output:
30353.15
code:
{subtot=+$1} END{print subtot}
The problem I encounter is it stops at commas and returns 30 as answer
And if I use this code:
{subtot=($1+0);subtot=+$1}... (9 Replies)
Discussion started by: paresh n doshi
9 Replies
LEARN ABOUT DEBIAN
audio::mpd::playlist
Audio::MPD::Playlist(3pm) User Contributed Perl Documentation Audio::MPD::Playlist(3pm)NAME
Audio::MPD::Playlist - class to mess MPD's playlist
VERSION
version 1.120610
SYNOPSIS
$mpd->playlist->shuffle;
# and lots of other methods
DESCRIPTION
Audio::MPD::Playlist is a class meant to access & update MPD's playlist.
Note that you're not supposed to call the constructor yourself, an Audio::MPD::Playlist is automatically created for you during the
creation of an Audio::MPD object - it can then be used with the "playlist()" accessor.
RETRIEVING INFORMATION
as_items
my @items = $pl->as_items;
Return an array of Audio::MPD::Common::Item::Songs, one for each of the songs in the current playlist.
items_changed_since
my @items = $pl->items_changed_since( $plversion );
Return a list with all the songs (as Audio::MPD::Common::Item::Song objects) added to the playlist since playlist $plversion.
ADDING / REMOVING SONGS
add
$pl->add( $path [, $path [...] ] );
Add the songs identified by $path (relative to MPD's music directory) to the current playlist. No return value.
delete
$pl->delete( $song [, $song [...] ] );
Remove the specified $song numbers (starting from 0) from the current playlist. No return value.
deleteid
$pl->deleteid( $songid [, $songid [...] ] );
Remove the specified $songids (as assigned by mpd when inserted in playlist) from the current playlist. No return value.
clear
$pl->clear;
Remove all the songs from the current playlist. No return value.
crop
$pl->crop;
Remove all of the songs from the current playlist except the song currently playing.
CHANGING PLAYLIST ORDER
shuffle
$pl->shuffle;
Shuffle the current playlist. No return value.
swap
$pl->swap( $song1, $song2 );
Swap positions of song number $song1 and $song2 in the current playlist. No return value.
swapid
$pl->swapid( $songid1, $songid2 );
Swap the postions of song ID $songid1 with song ID $songid2 in the current playlist. No return value.
move
$pl->move( $song, $newpos );
Move song number $song to the position $newpos. No return value.
moveid
$pl->moveid( $songid, $newpos );
Move song ID $songid to the position $newpos. No return value.
MANAGING PLAYLISTS
load
$pl->load( $playlist );
Load list of songs from specified $playlist file. No return value.
save
$pl->save( $playlist );
Save the current playlist to a file called $playlist in MPD's playlist directory. No return value.
rm
$pl->rm( $playlist );
Delete playlist named $playlist from MPD's playlist directory. No return value.
AUTHOR
Jerome Quelin
COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-03-01 Audio::MPD::Playlist(3pm)