Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > be.comp.os.linux > #6103
| From | Lieven Marchand <mal@wyrd.be> |
|---|---|
| Newsgroups | be.comp.os.linux |
| Subject | Re: bash scriptje |
| References | (3 earlier) <nf5f5t$i8t$1@dont-email.me> <nf5jq3$125j$1@gioia.aioe.org> <nf5k7g$5gr$1@dont-email.me> <nf5lok$15tk$1@gioia.aioe.org> <nf5o15$k9o$1@dont-email.me> |
| Date | 2016-04-19 19:31 +0200 |
| Message-ID | <87vb3dqzcj.fsf@black.wyrd.be> (permalink) |
Aragorn <thorongil@telenet.be.invalid> writes:
> Hier komt ie... ;)
>
> http://users.telenet.be/stryder/Linux/Shell/filmpje
Ik heb iets bijgeleerd. Ik wist niet van het bestaan van shuf
af. Bedankt.
Zelf heb ik al tijden een functie random_file in mijn .bashrc staan. Dus
ik zou gewoon 'vlc $(random_file)' doen.
function random_file()
{
IFS=$'\n'
FILES=($(list_files $1))
NUMBER_OF_FILES=${#FILES[*]}
RANDOM_FILE_NUMBER=$(($RANDOM%$NUMBER_OF_FILES))
RANDOM_FILE="${FILES[$RANDOM_FILE_NUMBER]}"
echo $RANDOM_FILE
}
function list_files()
{
ls -1 "${1:-.}"
}
--
Although the invention of computer science has presented several inconveniences
to mankind - ask ordinary Iraqis what they think of the computers on a cruise
missile -, it offers a great advantage to mathematical pedagogy: a proof is
totally correct if a suitably programmed computer could understand it. Godement
Back to be.comp.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar
bash scriptje Vito <vito@invalid.invalid> - 2016-04-19 15:28 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 15:39 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 15:44 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 16:29 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-19 17:45 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 17:55 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-19 18:18 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 19:00 +0200
Re: bash scriptje Lieven Marchand <mal@wyrd.be> - 2016-04-19 19:31 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 19:48 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-19 22:07 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 22:25 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 22:27 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-19 22:36 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-20 17:53 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-20 18:30 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-20 19:44 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-20 20:07 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-20 20:38 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-20 20:56 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-20 21:29 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-20 21:51 +0200
Re: bash scriptje Lieven Marchand <mal@wyrd.be> - 2016-04-20 22:31 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-21 11:01 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-21 11:59 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-21 12:58 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-21 13:34 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-21 14:19 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-21 14:25 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-21 14:44 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-04-21 15:23 +0200
Re: bash scriptje Vito <vito@invalid.invalid> - 2016-04-21 15:48 +0200
Re: bash scriptje Eddy Wally <eddy@haeven.com> - 2016-06-14 09:55 +0200
Re: bash scriptje wimpunk <ybwdlapvxvun@spammotel.com> - 2016-06-14 10:31 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-06-14 16:07 +0200
Re: bash scriptje Lieven Marchand <mal@wyrd.be> - 2016-06-14 20:17 +0200
Re: bash scriptje wimpunk <ybwdlapvxvun@spammotel.com> - 2016-06-15 08:32 +0200
Re: bash scriptje Eddy Wally <eddy@haeven.com> - 2016-06-15 13:04 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-06-15 16:03 +0200
Re: bash scriptje Lieven Marchand <mal@wyrd.be> - 2016-06-15 16:13 +0200
Re: bash scriptje Aragorn <thorongil@telenet.be.invalid> - 2016-06-15 17:33 +0200
Re: bash scriptje Eddy Wally <eddy@haeven.com> - 2016-06-16 13:23 +0200
csiph-web