Help with some Unix lines

expede

macrumors regular
Original poster
Jan 15, 2018
198
52
Sweden
Hi!

This is what I want:

1 Would like to get this line executed "sudo bless -device /dev/disk5s2 -mount /Volumes/BOOTCAMP -setBoot -nextonly"

2 But what do I need to ad to make the script automaticly execute my "password"

3 What shall I ad to make the osx reboot direct after the password?

Then I can save it in a file and do a "chmod 700" to make it executable. I what to just double-click on the file. I do not know Unix. I am just a user.

Best regads

/Per
 

okieiam

macrumors member
Dec 17, 2016
38
3
echo password | sudo -S bless -device /dev/disk5s2 -mount /Volumes/BOOTCAMP -setBoot -nextonly" && sudo reboot
 
  • Like
Reactions: expede

SecuritySteve

macrumors 6502a
Jul 6, 2017
745
859
California