linux - Simulating Enter in Bash Script on CentOS 6 Minimal -


right using:

echo -ne '\n' | alternatives --config java 

for

enter keep current selection, or type selection number: 

i know there many ways this. looking correct way perform action. don't know if i'm doing right.

probably use less interactive.

alternatives --set java /your/favorite/version 

should work. or can use 'expect' command emulate user input.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -