Advertisement
Guest User

Untitled

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