Skip to content

Instantly share code, notes, and snippets.

@inceabdullah
Last active November 3, 2021 19:05
Show Gist options
  • Save inceabdullah/a47f060d30746f5606246357a42f2214 to your computer and use it in GitHub Desktop.
Save inceabdullah/a47f060d30746f5606246357a42f2214 to your computer and use it in GitHub Desktop.
#!/bin/bash
journalctl-container() {
COMMAND="journalctl CONTAINER_NAME=\"$1\" -a $2"
bash -c "$COMMAND"
}
psg() {
CMD="ps auxw | grep --color -i \[${1:0:1}\]${1:1}"
bash -c "$CMD"
}
psgid() {
CMD="ps auxw | grep -i \[${1:0:1}\]${1:1} | awk '{print \$2}'"
bash -c "$CMD"
}
w1() {
CMD="watch -n1 '$@'"
bash -c "$CMD"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment