Is it possible to define the width/height of a Terminal window with this command: osascript -e \'tell application "Terminal" to do script [duplicate]

Solution 1:

Open a Terminal window and position it on the screen where you want it and resize it to the size you want.

Then in Terminal, execute the following command:

osascript -e 'tell application "Terminal" to get bounds of front window'

It will return a four-item list of integers, e.g:

0, 22, 730, 531

Now move the Terminal window to a different position on the screen and resize it.

Then in Terminal, execute the following command, while substituting the actual list returned from the get bounds command, e.g:

osascript -e 'tell application "Terminal" to set bounds of front window to {0, 22, 730, 531}'

You'll see that the window gets repositioned and resized to what it was when you ran the get bounds command.