Ubuntu :: Bash Script - Randomize The Order Of The Songs Within The Folders Too?

Jun 24, 2010

Quote:
#!/bin/bash
#Licence: GPL v3 or (at your option) any later as published by FSF.
# add as much as wanted; include the dot before the extension
FORMATS=( .mp3 .wav .ogg )
[Code]...

it works great, however, as it is now, it only seems to work if it was in the very folder (or in nautilus-scripts and I right clicked it from the very folder) it was looking for the music, such as in ~/Music, and then what it did was read all of the subfolders on the first tier in there, and then all the subfolders in those for music.

I figured out that by adding, cd ~/Music, it enables it to be right clicked anywhere and opens music only from the ~/Music folder it can be used. However, one thing that's odd is if the subfolder in ~/Music folder has a 'space' in it's title, (ie, ~/Music/Green Day), it would fail. This is not the case for subfolders of the first tier subfolders in ~/Music though, (ie, ~/Music/Jazz/Simply Red). Is there a way to randomize the order of the songs within the folders too?

View 9 Replies


ADVERTISEMENT

Programming :: Bash Script: Order And Display On External File

Mar 12, 2010

I'd like to create a script which allows me to order its data (let's say: Name, age, department and work start date) by date. And display the result in another file.

View 1 Replies View Related

Fedora :: Randomize Files In A Directory?

May 3, 2010

only does lines in text files, but I'd like something similar to sort .mp3 files in a directory, prior to burning them onto a DVD. How do I do that? Kurt

View 13 Replies View Related

Programming :: Bash: Rename Files In Alphabetical Order And Make Extensions Uppercase?

Oct 21, 2010

I am trying to write a bash script that will extract a .cbr (.rar) file, traverse the extracted files in alphabetical order and rename them 001.JPG, 002.JPG, 003.JPG, etc.So far I only have this much to extract it:

Code:
#!/bin/bash
#

[code]....

View 8 Replies View Related

Ubuntu :: Bash: List Contents Of Folders

Dec 1, 2009

how I sould do the following?

I have a folder called "Downloads" and among its contents there are a bunch of files with "flv" extension.

If I do

Code:
ls path/to/Downloads/*flv
I will get something like this:

[Code]....

(The reason I want something like that has to do with a small script I'm trying to write).

View 5 Replies View Related

General :: Randomize The Comma Separated String In Shell?

Oct 10, 2010

I wanted to randomize the comma separated string.String like "test1,test34,test5,test6".And it would be displayed differently when I ran each time.

Expected output like "test5,test6,test1,test34".

View 13 Replies View Related

Server :: Postfix Mailserver Randomize Transports Using Regexp (using N)?

Jun 5, 2010

Im using posfix as a outgoing mail server, here i want to distribute the mails to different ips to avoid the ip blacklisting. I found a solution by using multiple transports , but here one thing blocking me was i could not able to select a transport using regexp or pcre matching pattern, log says that

Code:
Jun 5 07:12:49 server postfix/trivial-rewrite[6079]: warning: pcre map /etc/postfix/transport.pcre, line 1: regular expression substitution is not allowed: skipping this rule

the transport used for this purpose is:-

Code:
#cat /etc/postfix/transport.pcre

/^.*@([a-z])ol.com$/ transport$1:

View 2 Replies View Related

General :: Bash: Find Folders With Less Than X Files?

Sep 18, 2010

How would I go about finding all the folders in a directory than contain less than x number of .flac files?

View 2 Replies View Related

General :: How To List Folders Using Bash Commands

Sep 14, 2011

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )

View 3 Replies View Related

General :: Bash - Create Folders According To Date In System?

May 26, 2011

Is there any other short/easier and smarter way to do the following in Linux? code...

I need to use crontab to create folders every day and every month inside /home/abcd/dammi, /home/abcd/harrami, /home/wxyz/dammi and /home/wxyz/harrami. Can anyone help me with this?

View 2 Replies View Related

General :: Tab-Completion In Bash Indexing System Folders?

Nov 15, 2010

tab-completion indexes system folders (like /usr/bin, /usr/local/bin)! so say i'm in a folder that has two files, 'text' and 'myprog', i type in an 'm' then tab, and i get hundreds of results including 'mysql', 'mysqlconfig', and others as im sure you can imagine. is there a way to set it to default or something else that will only make it index the current folder?

i tried changing my PATH variable so i could execute programs in the current directory without './' - what i added to PATH was ':.' at the end (apparently this is not the way to do it... :S). i tried resetting PATH various times ('unset PATH', 'PATH=$whatever...') but this has not fixed the problem. using 'unset PATH', of course, removes everything from PATH, which meant that functions (like 'ls') in /usr/bin and /usr/local/bin can't be found. obviously i want those to be found, but i would rather not tab through them!

View 2 Replies View Related

Fedora :: Bash Script Symbolic Link Multiple Folders?

Dec 23, 2009

I've been using fedora for quite some time now but I've never really written any bash scripts so I'm new to this. Basically what I'm trying to do is create symbolic links of movies that I have organized in this fashion:

Code:
Movies/A
Movies/B
Movies/C
etc.

I basically want to create an "ALL" folder that has links to all the movies in their designated folders. I have created somewhat of a bash script but it does not work.

Code:
#!/bin/bash
cd '/media/Videos/Movies'
for file_name in `ls *`
do
ln -s "$file_name" All/$file_name
done

I don't think its creating the right link to the movies and it is not taking into account the fact that some of the movies have spaces in their names.

View 2 Replies View Related

General :: Bash Script To Categorize Folders On Similar Names?

Oct 10, 2010

Any script to categorize folders with similar name into one directory. For example: There are 4 directories named LinuxFedora, LinuxUbuntu, WindowsXP and Windows7. The script should be able to create two folder named Linux and Windows wheree respective directories are moved.

Next example: If there are many folder as below:
DevLys 010
DevLys 010

[code]...

View 1 Replies View Related

General :: Make A Bash Script That Automatically Delete The Home Folders?

Feb 15, 2011

I am administrating a lab in a university and every semester we need to delete all the home folders of the accounts for the next semester. I would like to make a bash script that does this automatically and having trouble with it. Note that I am writing my very first bash script. What I need to do is make a script to delete the following:

Delete everything in /home/$exp$num/$dir
when "exp" could be either "rt", "ic" or "sp".
"num" could run from 1(single digit) to 45 and dir is "profile" and "work".

This is what I tried to write:

Code:

#!/bin/sh
cd /home
for exp in "rt ic sp"
do

[code]....

What seems to be the problem is the reading of "$exp$num" as a joint expression.

View 4 Replies View Related

General :: BASH Script To Move Files/folders To Either The .Trash File Or To Another Direcotry?

Dec 2, 2010

I am looking for a script/advice or guidance on how to write a script so that when I use the 'del' command it removes/sends the files/folders to a I specify for example 'dustbin

View 13 Replies View Related

General :: Use Sort Command For Its Ascending Order And Descending Order?

Aug 18, 2010

in my text file of 5 columns 2 column is in DDMMYYYY format. (ie DATE OF BIRTH). how to use sort command for its ascending order and descending order.

Is the same can be use for the date format YYYYMMDD ?

View 3 Replies View Related

General :: In Ubuntu 9.04 - Mount The Different Folders On The Partition To Different Folders In Home?

May 12, 2010

I have a shared NTFS partition ("shared") that I use for data for both Windows and Ubuntu. How can I mount the music folder on shared to $Home/Music, and the Videos folder on shared to $Home/Videos? I want to mount the different folders on the partition to different folders in home.

View 2 Replies View Related

Ubuntu :: Hiding Folders Inside Of Shared Folders?

Mar 27, 2010

I am setting up a lubuntu nas with all of my music, movies, etc on it. I want to give my kids access to my mp3 directory, so I can move all of the kid appropiate music into the root of my mp3 dir, in the same order I have all of my music sorted. Under the Music folder, I have them sorted, in folders, by letter. So A, B, C, D, etc... Now, in those folders are the respective artists. So where there may be something approipate in the P folder (say, Paramore), there is something inapproipate (say, Pantera)Now, when the kids go to the P folder, I don't want them to even see the Pantera folder. I just want them to see the Paramore folder. I tried a test using chmod 711 and chmod 700 on a directory with a test user, and the user can't access the directory, but can still see it

View 3 Replies View Related

Ubuntu :: Linking Content Of Windows Folders To Folders

Mar 31, 2010

The Problem was I wanted to open my /home/Pictures folder and have it display the contents of the My Pictures folder in my windows partition. This way I could have ubuntu and xp using the same set of music files, picture files, etc. I was having a very hard time understanding how to get from here to there because I'm such a newbie. However I have discovered how to do it and I wanted to post it, in hopes it will make things easier for other newbies.This allows me to see every TYPE of document in /dev/sda8/Media (windows My Documents folder) without having to see any of the folders (My Music, My Pictures, etc).

View 1 Replies View Related

Ubuntu :: Cannot Add Songs To An IPhone 3G?

Jun 9, 2010

I've just today received my copy of Ubuntu 10.04, and I have to say so far I'm loving it a whole lot more than Ubuntu 9.10. However I am having one problem with managing my iPhone 3G. The device shows up in Rhythmbox, but I am unable to add music to the iPhone library.

I'm using the iPhone 3.1.3 firmware, so I know that's not an issue. Has anyone got any idea as to how to solve this?

View 6 Replies View Related

Ubuntu :: Application To Slow Down Songs?

Jan 21, 2010

Is there any apps for Ubuntu that can play a song at a slower speed yet keep the tone (like windows media player)? For instance I want to play a song at half speed so I can learn the guitar part... I have done this with windows.

View 4 Replies View Related

Ubuntu :: How To Put Songs In IPod Shuffle

Oct 9, 2010

I want to put songs in my iPod shuffle but I don't know how. It is the previous generation, not the newest one, but the one before that one.

View 3 Replies View Related

Ubuntu :: Add Album Art To Songs Through Rhythmbox?

Jan 18, 2011

usually when i get songs i like to add art to them on the ipod

on itunes i would just select the song --> get info (or properties for this) and add it to the song

i cant find anything in rhythmbox for this, although it does display the artwork thats already on there

i know about gtxpod but i hate the interface and it's given me tons of problems already

banshee for some reason reads my music as video and my video as music

took me like an hour to put my street fighter music on a friggin ipod before i just gave up on trying to attach the cover art

View 2 Replies View Related

Ubuntu :: Songs Don't Appear On Iphone Even Though Put Them On There With Banshee

May 9, 2011

iPhone 3G; Ubuntu 11.04; tried Banshee, Rythmbox, and Amarok. It looks like the songs went on my iPhone when I look at Rythmbox or Banshee under Devices. However, when I go to to the iPhone, I cannot see the songs under iTunes. Nothing is there

View 1 Replies View Related

Ubuntu :: How To Embed Cover Art In Songs

Jun 25, 2011

Is it possible to embed cover art in songs by any application in ubuntu? Preferably by banshee media player or any media player which shows cover art.

View 3 Replies View Related

Ubuntu Multimedia :: Online Playlist For Songs?

Apr 28, 2010

is there a way of playing songs that are available in the internet using totem music player, or any other application. for example, this link http://fizy.com/s/1ai91v refers to a song that is present on a web page. i want to play it on a music player, and many other songs also. my aim is to create a playlist of songs that are available on the internet. so i can listen to those songs whenever i am online.

what is a smart way of doing it.? i dont mean downloading, because those songs cant be downloaded but can only be listened.

View 1 Replies View Related

Ubuntu :: Rhythmbox Keeps Playing Songs With No Sound?

May 7, 2010

For some reason, Rhythmbox will show itself playing a song (the notification in the top right corner) but I hear no sound. I can go to the application itself and see the play slider moving. I can't pause it or anything. if it's a bug in Rhythmbox itself. If I browse to the directory, and right click > Open with Rhythmbox, it works perfectly (although I still can't pause it)

Also, if I jump to another song, and then play the song it was playing silently, it works. Not sure why it does this.

I doubt it's the files themselves because I've been downloading all my songs from one site, and never had an issue in iTunes on a windows PC. It only does this to about 3 songs out of 164. It used to do this to only 2, but now it's doing it to 3 since the past few days when adding more songs.

View 9 Replies View Related

Ubuntu Multimedia :: K3b Won't Burn Ripped Songs To CD

Jun 2, 2010

I ripped 2 music CDs for a total of 78 minutes, but K3b won't burn them to a blank CD-R. It says the free space in temporary folder is 615.5 MB, but the size of project is 691.5 MB. I don't know why the tmp directory is that small when I have 615 GB free on my filesystem. When I start the burn, it simply says copying, but nothing shows up in the progress bars. I am able to burn direct copies of CDs, however. After a couple of tries and a couple of successful burns of entire CDs, I tried again, and it crashed.

View 4 Replies View Related

Ubuntu Multimedia :: Rhythmbox - Where Crossfade Between Songs Gone

Jun 24, 2010

I wanted to try gapless playback on Rhythmbox, but I can't find the "crossfade between songs" option anywhere.
See here for comparison:
[URL] and mine: [URL]
where is this option gone?!

View 5 Replies View Related

Ubuntu Multimedia :: Ssh Songs From Ipod Touch?

Aug 12, 2010

Any who, like the title says if i ssh into my ipod on to ubuntu will the titles be screwed up?

I have a lot of songs there and i dont want to have to re write over 1000 song titles.

my ipod is jailbroken. i have firmware 4.0 and i think i am running Ubuntu Netbook remix 10.04 and i use rythmbox.

so can it b done

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved