summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-06-27 02:06:57 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-06-27 02:06:57 -0700
commit415a169d17d251add2fdb81d0141b891b2893c8a (patch)
treefd0bc5e77ea0b65b5f8a1cbc1975a7763bd326ff /sh
parent9fa3a43dab970028aac3d89621ed900e3b539c6a (diff)
refactor: only awk, no need grep
Diffstat (limited to 'sh')
-rwxr-xr-xsh/u4
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/u b/sh/u
index 6fe79ea..59aa76a 100755
--- a/sh/u
+++ b/sh/u
@@ -3,8 +3,8 @@
ssh-add -l || ssh-add
-#for branch in $(git -C "$HOME/programs/config_local_arch" branch | awk '{print ($1=="*")?$2:$1}' | grep -v master); do
-git -C "$HOME/programs/config_local_arch" branch | awk '{print ($1=="*")?$2:$1}' | grep -v master | while read -r branch; do
+#for branch in $(git -C "$HOME/programs/config_local_arch" branch | awk '!/master/{print ($1=="*")?$2:$1}'); do
+git -C "$HOME/programs/config_local_arch" branch | awk '!/master/{print ($1=="*")?$2:$1}' | while read -r branch; do
# alacritty use -T to change window name so I can identify different servers
# need to invoke bash afterwards for manual things like reboot if linux upgrades and pacdiff
# maybe can automate further so no need manual things