I'm new to AppleScript. I am trying small projects and improve on my knowledge for bigger projects.
My attempt is to extract specific network info using ifconfig. I've tried this, but returns
"Expected end of line but found identifier."
Then "inet" is highlighted. Removing "" from inet shows more lines than I want. What's the syntax for multiple commands within a command?
tell application "Terminal" to activate
delay 2
tell application "System Events" to tell "Terminal"
keystroke "ifconfig | grep "inet " | grep -v 127.0.0.1"
end tell
The following example AppleScript code will do what you are trying to do:
Example AppleScript code: