1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/expect -f # Get a Bash shell spawn -noecho bash # Wait for a prompt expect "$ " # Type something send "nohup " # Hand over control to the user interact -o \n exit exit