Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

Mac Help with some Unix lines

expede

macrumors regular
Original poster
Jan 15, 2018
203
55
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
Comment

expede

macrumors regular
Original poster
Jan 15, 2018
203
55
Sweden
Hello, okieiam!

Thanks! I´ll test this one out.

Best regards

/Per
 
Comment

SecuritySteve

macrumors 6502a
Jul 6, 2017
856
982
California
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.