R
R
Roman Nazarkin2013-11-17 21:02:39
terminal emulator
Roman Nazarkin, 2013-11-17 21:02:39

Is it possible to group a chain of console commands into a file?

System - Mac OS 10.9
I would like a simple chain of commands:

sudo [password]
purge

Group into a file and launch by clicking from the desktop. Is it real and how?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
avalak, 2013-11-17
@TrickyMilk

#!/usr/bin/env bash
# script.sh

# команды

Then chmod +x script.sh
To execute sudo without prompting for a password, you can use SUDO_ASKPASS + script or the local equivalent of gksudo (window with password prompt)

P
Puma Thailand, 2013-11-17
@opium

Well, just make a shell script and run it, I don’t really understand who is stopping you from doing this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question