Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to run fdisk and automatically do a particular command, like p (print)

installation.sh:

fdisk /dev/sdc1

I don't know how to give the process input to the programm.

share|improve this question
add comment

1 Answer 1

You Can use crontab

crontab -e

crontab tool in linux is used to run script automatically.

you have to write MIN HOUR DOM MON DOW CMD your_script in crontab shell than you script will run automatically.

suppose if min=1 and remaining things are * than your script will run in every 1 min.

For more http://en.wikipedia.org/wiki/Cron

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.