2 Replies Latest reply: Feb 23, 2013 3:01 PM by tal1971
tal1971 Level 2 Level 2 (245 points)

I have a regular used Terminal command that I use often.

 

This one:

 

ls -al /var/log/*.out

 

 

I was wondering if I could create something with Automator that would load up Terminal then automatically enter/paste the above command. Then all that would be needed for me to do would be to press enter?

 

I would need Terminal to load up/appear as I would need to see the result of the entered command.

 

Thanks in advance


iMac (27-inch, Late 2012), OS X Mountain Lion (10.8.2), iPad (3rd Gen) 32GB iPhone 5 32GB
  • Niel Level 10 Level 10 (275,020 points)

    Open the AppleScript Editor in the /Applications/Utilities/ folder and paste in the following:

     

    do shell script "ls -al /var/log/*.out"

     

    Save the script and set it as a login item in the Users & Groups pane of System Preferences.

     

    (77441)

  • tal1971 Level 2 Level 2 (245 points)

    Niel wrote:

     

    Open the AppleScript Editor in the /Applications/Utilities/ folder and paste in the following:

     

    do shell script "ls -al /var/log/*.out"

     

    Save the script and set it as a login item in the Users & Groups pane of System Preferences.

     

    (77441)

     

    Thanks Niel for the help.

     

    So now that I have an icon created from doing what you mentioned earlier. Do I just double click on the icon, then when the Apple Script Editor window appears, do I just click on the Run button, and then the result of the ls -al /var/log/*.out will be displayed in the bottom part?