Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- dir=' /home/benutzer/ordner ' #PFAD ANPASSEN
- n_files=`/bin/ls -1 "$dir" | wc -l | cut -f1`
- rand_num=`awk "BEGIN{srand();print int($n_files * rand()) + 1;}"`
- file=`/bin/ls -1 "$dir" | sed -ne "${rand_num}p"`
- path=`cd $dir && echo "$PWD/$file"` # Converts to full path.
- vlc "$path" #GGF. ANWENDUNG ANPASSEN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement