Sponsored Content
Top Forums Shell Programming and Scripting Rename first N numeric strings in filename Post 303033790 by Don Cragun on Thursday 11th of April 2019 04:54:35 PM
Old 04-11-2019
Just be careful removing all leading digits if you have songs in your library by 3 Dog Night, 9 Inch Nails, or other artists who have chosen names starting with a number. Smilie
These 3 Users Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Wanted to eliminate numeric part from a filename

Hi, I have a filename called XYZ12345.txt.I just want to eliminate numeric and have only XYZ.txt. How can i do it ? Regards, Sona. (8 Replies)
Discussion started by: Sona
8 Replies

2. Shell Programming and Scripting

rename multiple filename.45267.txt to >> filename.txt

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)
Discussion started by: jason7
6 Replies

3. Shell Programming and Scripting

Grep and rename the filename

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)
Discussion started by: badbunny9316
16 Replies

4. UNIX for Dummies Questions & Answers

rename filename

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)
Discussion started by: sakets_2000
6 Replies

5. Shell Programming and Scripting

Rename FileName in the Directory

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)
Discussion started by: gavemani
5 Replies

6. UNIX for Dummies Questions & Answers

sort files by numeric filename

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)
Discussion started by: chen.xiao.po
1 Replies

7. UNIX for Advanced & Expert Users

query display number lines or records present in file only numeric value -without filename

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)
Discussion started by: ksrivani
3 Replies

8. UNIX for Dummies Questions & Answers

Listing numeric strings alone

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)
Discussion started by: pandeesh
4 Replies

9. Shell Programming and Scripting

Sort log files based on numeric value in the filename

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)
Discussion started by: alex2005
4 Replies

10. Shell Programming and Scripting

Add edited numeric strings in awk

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
MPD-SIMA.CFG(5) 					       mpd-sima User Manual						   MPD-SIMA.CFG(5)

NAME
mpd-sima.cfg - mpd-sima will try to maintain some titles ahead in your play list following different policies. This manual document the configuration file for mpd-sima. DESCRIPTION
This manual page documents briefly mpd-sima configuration options available in user configuration file (see the section called "FILES"). CONFIGURATION FILE
The configuration file consists of sections, led by a [section] header and followed by name: value entries, with continuations in the style of RFC 822 (see section 3.1.1, "LONG HEADER FIELDS"); name=value is also accepted. Lines beginning with '#' or ';' are ignored and may be used to provide comments. The default values are used in the options lists below. MPD section This section is meant to configure MPD access, MPD host address / port and password if necessary. [MPD] host=localhost Set MPD host. Use IP or FQDN. port=6600 Set host port to access MPD to. password=false Set MPD password to use. Do not use this option if you don't have enabled password protected access on your MPD server. log section Configure logging. [log] verbosity=info Logging verbosity among debug, info, warning, error. sima section This section allows you to tweak mpd-sima behaviour such as how many tracks to add and/or what queue mode you want etc.. [sima] queue_mode=track Queue mode to use among track, top and album (see the section called "QUEUE MODES" for info about queue modes). similarity=15 Similarity value as a percentage, use to filter similar artists results. The value of similarity is used to filter similar artists list from database (last.fm and user db). dynamic=10 Dynamic value as an integer. Sets how many similar artists to retrieve from local music library. mpd-sima will try to gather at most dynamic artists from local media library at least similarity% similar. If dynamic is zero, then mpd-sima gathers all artists from similar artists list also present in local library and at least similarity% similar. user_db=false Look for user defined similarities in user data base. history_duration=8 How far to look back in history to avoid to play twice the same track/title (duration in hours). consume=0 How many played tracks to keep in the play list. Allow to maintain a fixed length play list. Set to 0 to keep all played tracks. single_album=false Prevent from queueing a track from the same album (it often happens with OST). Only relevant in "track" queue mode. check_new_version=false Checks the forge for new version of MPD_sima. The following options are still part of sima section but you usually do not need to change them. queue_length=1 This value triggers queue process if the play list length is less than specified queue_length. track_to_add=1 How many track(s) to add. Only relevant in top and track queue modes. album_to_add=1 How many album(s) to add. Only relevant in album queue modes. QUEUE MODES
mpd-sima offers different queue modes. All of them pick up tracks from artists similar to the one currently played. mpd-sima tries preferably to chose among unplayed artists or at least not recently played artist. Concerning track and album queue modes titles are chosen purely at random among unplayed tracks. track Queue a similar track chosen at random from a similar artist. top Queue a track from a similar artist, chosen among "top tracks" according to last.fm data mining. album Queue a whole album chosen at random from a similar artist. Nota Bene: Due to the track point of view of database build upon tracks tags an album lookup for a specific artist will return albums as soon as this artist appears in a single track of the album. For instance looking for album from "The Velvet Underground" will fetch "Last Days" and "Juno" OSTs because the band appears on the soundtrack of these two movies. A solution is for you to set AlbumArtists tag to something different than the actual artist of the track. For compilations, OSTs etc. a strong convention is to use "Various Artists" for this tag. mpd-sima is currently looking for AlbumArtists tags and avoid album where this tag is set with "Various Artists". If a single track within an album is found with AlbumArtists:"Various Artists" the complete album is skipped and won't be queued. It is planned to allow users to set the values of AlbumArtists tag triggering this behaviour. cf. feature request #2085 on the tracker. FILES
Unless you override it mpd-sima will try to read the configuration file name mpd_sima.cfg in the standard location within XDG_CONFIG_HOME. ${XDG_CONFIG_HOME}/mpd_sima/mpd_sima.cfg The per-user configuration file. Usually XDG_CONFIG_HOME is set to ${HOME}/.config. EXAMPLES
Album queue mode. Here is an example of album queue configuration. [MPD] host=example.org port=8000 [sima] queue_mode = album consume = 30 # keep 30 played tracks in playlist BUGS
The upstream BTS can be found at http://codingteam.net/project/sima/bugs. FEEDBACK
The maintainer would be more than happy to ear from you, don't hesitate to send feedback on the forge, via the upstream BTS, the forum or the chat room, all available on the forge at http://codingteam.net/project/sima. XMPP users are welcome to join the dedicated chat room at sima@conference.codingteam.net. SEE ALSO
mpd-sima(1), simadb_cli(1) /usr/share/doc/mpd-sima/ AUTHOR
Jack Kaliko <efrim@azylum.org> Wrote this man page and is currently leading MPD_sima project. COPYRIGHT
Copyright (C) 2009-2012 Jack Kaliko This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. mpd-sima 02/17/2012 MPD-SIMA.CFG(5)
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy