Results 1 to 3 of 3
I have a situation where I am in a non-interactive shell. Therefore I do not see the output of anything I type unless I do like so:
ls -al > ...
- 02-04-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 2
How to turn a non-interactive shell into an interactive shell?
I have a situation where I am in a non-interactive shell. Therefore I do not see the output of anything I type unless I do like so:
ls -al > /dev/tty1
I have tried from within my non-interative shell to spawn an interactive shell like so:
/bin/sh -i
but my output still does not goto me. Isn't there a way I can somehow go into /proc or somwhere and make the output my /dev/tty1? Or some way else to remedy this?
The situation arises because I drop from my restricted shell environment (a sort of CLI interface), into the actual Linux shell. I cannot change the code of the CLI environment I am just faced with being in the linux shell environment and its non-interactive. Its very annoying to have to put > /dev/tty1 after every command I type.
Not to mention it seems damn near impossible to get pagers like more and less to work properly when your in a non-interactive shell.
Thanks in advance for any ideas
- 02-06-2011 #2Just Joined!
- Join Date
- Feb 2011
- Posts
- 12
You can redirect the shell output to a file when you launch it, as in,
Which is equivalent to putting > file.txt after every command you type.Code:uname@ubuntu:~$ bash > file.txt
- 02-06-2011 #3Just Joined!
- Join Date
- Feb 2011
- Posts
- 2
Just what I was looking for, thanks!


Reply With Quote