Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
dirrand
SUBMITTED BY:
Guest
DATE:
Feb. 23, 2013, 10:36 p.m.
FORMAT:
Bash
SIZE:
321 Bytes
Raw
Download
Tweet
HITS:
1680
Go to comments
Report
#!/bin/bash
let
FILECOUNT
=
$RANDOM
%
`
ls
|
wc
-l
`
;
echo
$RANDOM
%
$FILECOUNT
for
i
in
$(
ls
)
;
do
if
[
$FILECOUNT
-gt
1
]
;
then
let
FILECOUNT-
=
1
;
else
file
$i
# echo $i
cd
$i
if
[
$?
-eq
0
]
;
then
dirrand
;
fi
exit
;
fi
done
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus