Good Afternoon,
I have just ported from Linux to FreeBSD 10.0 x64. I am in the process of modifying my shell scripts.
I am not a shell scripting expert. In my user shell, I use bash. I didn't change the root shell from sh. Under linus, I used the "shuf" command which doesn't exist in FreeBSD.
One shell script I had running under cron under linux, would randomize a filename taken out of a specified directory, then my shell script would pipe it to the appropriate entry in MATE to change the background. You see, MATE doesn't have this functionality.
Here is my code-snippet(non-working as I removed the linux specific code)
I need to add FreeBSD functionality to the end of that line that looks at a specified directory, and selects a filename from that directory at random.
Can someone please help me out?
Sincerely and respectfully,
Dave
I have just ported from Linux to FreeBSD 10.0 x64. I am in the process of modifying my shell scripts.
I am not a shell scripting expert. In my user shell, I use bash. I didn't change the root shell from sh. Under linus, I used the "shuf" command which doesn't exist in FreeBSD.
One shell script I had running under cron under linux, would randomize a filename taken out of a specified directory, then my shell script would pipe it to the appropriate entry in MATE to change the background. You see, MATE doesn't have this functionality.
Here is my code-snippet(non-working as I removed the linux specific code)
Code:
#!/usr/local/bin/bash
#
# Mate 1.6 version for changing backgrounds in a cron job
#
gsettings set org.mate.background picture-filename
I need to add FreeBSD functionality to the end of that line that looks at a specified directory, and selects a filename from that directory at random.
Can someone please help me out?
Sincerely and respectfully,
Dave