script output.txt From man script:
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). You can start a script session by just typing script in the terminal, all the subsequent commands and their outputs will all be saved in a file named typescript in the current directory. You can save the result to a different file too by just starting script like: script output.txt To logout of the script session (stop saving the contents), just type exit. Here is an example: $ script output.txt Script started, file is output.txt $ ls output.txt testfile.txt foo.txt $ exit exit Script done, file is output.txt Now if I read the file: $ cat output.txt Script started on Mon 20 Apr 2015 08:00:14 AM BDT $ ls output.txt testfile.txt foo.txt $ exit exit Script done on Mon 20 Apr 2015 08:00:21 AM BDT script also has many options e.g. running quietly -q (--quiet) without showing/saving program messages, it can also run a specific command -c (--command) rather than a session, it also has many other options. Check man script to get more ideas.
0 Comments
The current recommendation is to use python -m pip, where python is the version of you would like to use. This is the recommendation because it works across all versions of Python, and in all forms of virtualenv. For example:
# The system default python: $ python -m pip install fish # A virtualenv's python: $ .env/bin/python -m pip install fish # A specific version of python: $ python-3.6 -m pip install fish Since version 0.8, Pip supports pip-{version}. You can use it the same as easy_install-{version}: Had the same problem. Installing python from the source helped.
# Remove existing python 3.6 if installed with apt $ sudo apt-get autoremove python3.6 # Get the source $ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz $ tar xvf Python-3.6.1.tar.xz $ cd Python-3.6.1 # Configure and install $ sudo ./configure $ sudo make altinstall # Success! $ pip3.6 -V pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6) I particulary found that really interesting... have a look on stackoverflow.
|
Archives
January 2021
Categories |