Devise script command utility with one simple line command
The script utility works like this: $ script Script started, file is typescript $ ls 2 bin doubleline new1 play typescript alok core filelist output pslist unix $ ps PID TTY TIME CMD 28149 pts/7 0:00 ksh.ms $ Script done, file is typescript After this contents of the typescript file are: $ cat typescript Script started on Wed Sep 07 05:56:26 2011 $ ls 2 bin doubleline new1 play typescript alok core filelist output pslist unix $ ps PID TTY TIME CMD 28149 pts/7 0:00 ksh.ms $ script done on Wed Sep 07 05:56:33 2011 $ I want to copy this behaviour with using other commands and I/O redirections. The solution must be a one line command (may include pipelined commands). Any help would be great, like if anyone can tell how can we redirect stdin, stdout and stderr to some file while all the data is still on the terminal.
$tee -a typescript | sh -i 2>&1 | tee -a typescript
How can I execute a script that runs within an xterm/xgterm?
ssh executing nsenter as remote command with interactive shell in golang to debug docker container
ksh88 changing single quotes to double quotes inside heredocs?
Shell script replace variable with another variable have content & character by using sed
shell script that send email before exiting
how can we remove last 7 lines of file in unix [duplicate]
Shell Script improvement for getting diff result
hbase shell command - scan and Filter
How can I conditionalize a WiX custom action based on user priviledges
What does 1>&2 mean in shell? [duplicate]
UNIX: recursively paste a substring into the same string in unix
docker login in shell script dont work
Run a script every x seconds without waiting for it to complete
rename files in current folder (mandatory : for mv cut commands)
How to feed the output of one pipe to another pipe?
(Tcl?) Script for running modelsim with testbench as parameter from shell