Table of Contents |
---|
*nix
Grep
grep '^a.*e$' file
This means: look for those lines starting (^
) with a
, then 0 or more characters and finally and e
at the end of the line ($
).
vi
https://www.cs.colostate.edu/helpdocs/vi.html
Macintosh
Killing Things
Quit an App
osascript -e ‘tell application “safari” to quit’
...
#!/bin/bash
Split a Text File into pieces based on text
...
split -p '^1 row.*' Software\ on\ Refreshing\ Windows\ Computers.txt
Macintosh
Killing Things
Quit an App
osascript -e ‘tell application “safari” to quit’
Starting A Shell Script
#!/bin/bash
Ditto
Creating a zip file
sudo -s
...
Initialize-Disk -Number 0 -PartitionStyle GPT
Getting System Info
Detecting Windows Version
CMD:
ver | find "6.3" >nul && goto WIN8
...
Get-WindowsEdition -Verbose -Online
Detecting Hardware Model
if /i "%WMICModel:~0,7%"=="20074DU" set TP=y
...