Last active
September 11, 2024 15:17
-
-
Save ychaouche/18ec2f37851977e953c741a474dd8aef to your computer and use it in GitHub Desktop.
This file contains 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
# -*- shell-script -*- | |
export INTERFACE="eth4" | |
export PATH="$PATH":~/SYNCHRO/bin/ # put the path to where net.ip.private is | |
export BOOTTIME=$(sys.boottime) |
This file contains 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
1. Download sys.boottime to a bin directory in your $PATH | |
2. download .bashrc_emacs in your $HOME | |
3. add (setenv "BASH_ENV" (expand-file-name "~/.bashrc_emacs")) to your init.el or any buffer (*scratch* is just fine) and evaluate it with C-x C-e | |
4. now try to invoke any shell command with M-!, for example M-! date RET. | |
In my case, emacs just froze. |
This file contains 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
;; add this to your init.el | |
(setenv "BASH_ENV" (expand-file-name "~/.bashrc_emacs")) |
This file contains 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
#!/bin/bash | |
last reboot | awk 'NR == 1 {print $5,$6,$7,$8}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment