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 - CUDA code not processing if block properly -

Android Capture Image From Camera -

Define custom list-style-type in CSS -