file content as a command input on linux -
for example, have file a.txt content "123456" root's password. input command "su", displays "password: " prompt me input password.
how can regard file content (i.e. "123456") input of password?
thanks of you!
if command expects on command line, can use syntax like
ls -ll `cat file_list.txt` but if want automate commands, maybe can consider give @ expect
in specific case, suppose better solution go expect, since su don't seems expect password command line argument
Comments
Post a Comment