Last active
March 7, 2019 21:31
-
-
Save chrdek/fc48ea2ec83bb7bd7e35a77ef0639798 to your computer and use it in GitHub Desktop.
Print terminal info, previous command runs in terminal cons.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rm "$HOME\Documents\outps.txt" | |
| echo "Home Dir is ---> $HOME" >> "$HOME\Documents\outps.txt" | |
| echo "Default Path is --> $PWD" >> "$HOME\Documents\outps.txt" | |
| echo "Version is --> $BASH_VERSION (not running in ps)" >> "$HOME\Documents\outps.txt" | |
| echo "Term type is --> $TERM (not running in ps)" >> "$HOME\Documents\outps.txt" | |
| cat "$HOME\Documents\outps.txt" | |
| powershell.exe cat "$HOME\Documents\outps.txt" | |
| ########################################################################################### | |
| function ret1st() { | |
| return "Last command was: "+$$; | |
| } | |
| ret1st; | |
| function ret2nd() { | |
| return "Latest command was: "+$_; | |
| } | |
| ret2nd; | |
| ########################################################################################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment