Some complex but useful Linux commands

13:13:00 2 Comments

Find upgradable bower dependencies
bower list | sed 's/^[├└─┬│ ]*//g' | sort | uniq | egrep 'available|latest'

Find all bower dependencies
bower list | grep '#' | sed 's/^[├└─┬│ ]*//g' | sed 's/#.*//g' | sort | uniq

Find declared bower dependencies
awk '/dependencies/{f=1;next} /resolutions/{f=0} f' bower.json | grep -v '}' | sed 's/^[ "]*//g' | sed 's/".*//g' | sort | uniq

Find unlisted/undeclared bower dependencies
diff <(bower list | grep '#' | sed 's/^[├└─┬│ ]*//g' | sed 's/#.*//g' | sort | uniq) <(awk '/dependencies/{f=1;next} /resolutions/{f=0} f' bower.json | grep -v '}' | sed 's/^[ "]*//g' | sed 's/".*//g' | sort | uniq)

Check custom elements used vs imports
diff <(grep -hroE --include \*.html "[/\"][a-zA-Z0-9]+(-[a-zA-Z0-9]+)+\.html" . | cut -c2- | rev | cut -c6- | rev | sort | uniq) <(grep -hroE --include \*.html "<[a-zA-Z0-9]+(-[a-zA-Z0-9]+)+[ >]" . | tr -d '< >' | sort | uniq) -y

Search and replace recursively
grep -lrZ --include \*filepattern "searchtext" . | xargs -0 -l sed -i -e 's/searchtext/newtext/g'
SSH Tunnelling from Local to Remote
ssh -f -v -4 user@ssh_server_ip -p <ssh_port> -L <local_machine_bind_ip>:<local_listening_port>:<accessing_ip_from_server>:<accessing_port> -N

2 comments :

  1. The casino also hired a brand new} host to work with high-limit gamblers and added an Asian buffet and a cashier cage in the high-limit space, Strafella stated. The casino made room for the additions by shifting a poker room to another property, Lone Butte casino. "All the games have been open all week and been performing unbelievably," Gila River’s Chief Operations Officer Richard Strafella stated Wednesday. Whatever the occasion, we’re right here to assist with get together inspiration, suggestions & tips, particular presents and 메리트카지노 reductions. Games A assortment of small yard games that may be} added to your reserving. Yard Cards Add a greeting to your yard with our choice of cards.

    ReplyDelete
  2. Blackjack is a simple card sport with a component of ability to it — and the chances of successful aren't too unhealthy. Several folks can play at one time, but every is simply attempting to beat the supplier, do not appear to be} enjoying in} towards one another. The supplier and the participant compete to see whose 메리트카지노 hand comes closest to 21 without going over (which recognized as} a "bust").

    ReplyDelete