politicus Posted February 25, 2019 Share Posted February 25, 2019 I am trying to create a workflow that would display a random line from a .txt file. In other other words, use the shuf command to pick a line and display it with a "Large type" object. My problem is I can't find a way to run the command "shuf -n 1 ~/Downloads/NameOfMyFile.txt". I tried to use a "Run script object" wit no luck. Here is the link to the workflow https://www.dropbox.com/s/0io9515ijeepixt/00_One_Line_Picker.alfredworkflow?dl=0 Thank you. Link to comment
Andrew Posted February 25, 2019 Share Posted February 25, 2019 @politicus put the absolute path to shuf, wherever you have it installed. Cheers, Andrew politicus 1 Link to comment
politicus Posted February 25, 2019 Author Share Posted February 25, 2019 @AndrewThanks for your fast answer ! This is what my script looks like. /usr/local/bin/shuf shuf -n 1 ~/Downloads/One_Liner_Harvey.txt And it still doesn't work. I just do not understand how to use this object. Link to comment
deanishe Posted February 25, 2019 Share Posted February 25, 2019 That isn't what Andrew meant. Try this: /usr/local/bin/shuf -n 1 ~/Downloads/One_Liner_Harvey.txt Andrew and politicus 2 Link to comment
politicus Posted February 25, 2019 Author Share Posted February 25, 2019 Thanks @deanishe ! Now this is working 👍 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now