I have a “smart” phone that doesn’t seem to have a music shuffle function, so the next best thing is to write a bash script to prepend all filenames in the current directory with a random number.
Is this difficult to do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, this is not hard to do. It will however mess up your carefully crafted filenames, and might be hard to undo.
You can use
$RANDOMas a simple source of random numbers in bash. For yourcase:
I didn’t test this. You probably want to test this yourself on some small
sample to make sure you know what it does.