groupInfo expandAfterMode 0 groupName Shell Commands snippetsTE2 abbreviation shell:script:new abbreviationMode 1 creationDate 2013-07-16T21:59:28Z flags 0 label Create new shell script modificationDate 2013-07-16T22:08:03Z plainText #!/bin/sh ####################################### # # Shell command parameters # ####################################### #%filltext:name=Command Name% init #%filltext:name=Command Name% run #%filltext:name=Command Name% status ####################################### # # Shell command logic # ####################################### # Check first parameter if [ $1 ] then # do stuff case "$1" in init) ;; status) ;; run) ;; *) help ;; esac else # show help help fi ####################################### # # Shell command functions # ####################################### function help () { echo "%filltext:name=Command Name% - A simple script that does something useful, hopefully." echo " echo " %filltext:name=Command Name% init - include in the project"; echo " %filltext:name=Command Name% run - runs something"; } snippetType 0 useCount 0 uuidString 3788A187-6FC8-43D9-A7B6-CC97D56C2BAA abbreviation ssh:key:deploy abbreviationMode 1 creationDate 2013-07-15T21:50:37Z flags 0 label SSH copy public key to remote server modificationDate 2013-07-15T21:54:21Z plainText ssh-copy-id %fillpart:name=Specific public key:default=yes%-i ~/.ssh/id_rsa.pub%fillpartend% %filltext:name=Remote host% snippetType 0 useCount 0 uuidString 8CE1ECC0-9699-468B-8DB7-D0C4C6B5F396 abbreviation test:echo abbreviationMode 1 creationDate 2013-06-23T07:00:52Z flags 0 label Test echo modificationDate 2013-06-23T07:01:05Z plainText echo -e "An apple a day keeps away \a\t\tdoctor\n" snippetType 0 useCount 0 uuidString 4DD6D240-E9D6-4C09-941A-DE79282DC4E3 abbreviation watch:file abbreviationMode 1 creationDate 2013-06-23T05:40:30Z flags 0 label Watch a file change modificationDate 2013-06-23T05:40:30Z plainText tail -c %filltext:name=Number of lines:default=100:width=25% %clipboard snippetType 0 useCount 0 uuidString B318A09A-97DC-472F-8A0A-3334F140BE94 abbreviation file:read abbreviationMode 1 creationDate 2013-06-23T05:38:02Z flags 0 label Read the first number of lines of a file modificationDate 2013-06-23T05:39:32Z plainText head -%filltext:name=Number of lines:default=10:width=25% %clipboard snippetType 0 useCount 0 uuidString C53FD585-3475-440B-8AAB-2D089201AF61 abbreviation rsync:remote abbreviationMode 1 creationDate 2013-06-23T04:55:41Z flags 0 label rsync between remote and local modificationDate 2013-06-23T05:45:04Z plainText rsync -ahiz%fillpart:name=Verbose output:default=yes%v%fillpartend% %fillpart:name=Show progress:default=yes%--progress%fillpartend%%fillpart:name=Limit bandwidth%--bwlimit=10000%fillpartend%%filltext:name=username%@%filltext:name=Remote server%:%filltext:name=Copy from:width=35% %filltext:name=Copy to:width=35% %fillpart:name=Verbose output%-v%fillpartend% snippetType 0 useCount 0 uuidString DF9C3E69-5B0F-46CA-8FC2-E05D82EE2A70 abbreviation rsync:local abbreviationMode 1 creationDate 2013-06-23T04:49:58Z flags 0 label rsync between two local paths modificationDate 2013-06-23T05:42:45Z plainText rsync -avhi --progress %fillpart:name=Simulate run%--dry-run%fillpartend% %fillpart:name=Include pattern%--include '*.xyz'%fillpartend%%fillpart:name=Exclude pattern:default=yes%--exclude '*.xyz'%fillpartend% %filltext:name=Source path:width=35% %filltext:name=Destination path:width=35% snippetType 0 useCount 0 uuidString 4CA4FDB0-D018-4314-97FA-7FDD71F5B8DD abbreviation files:loop abbreviationMode 1 creationDate 2012-01-02T17:03:59Z flags 2 label Loop through files modificationDate 2012-03-18T08:37:48Z plainText for $file in $(cd a; find / -type -f); do diff a/$file b/$file > $a/$file.diff; done snippetType 3 useCount 0 uuidString BE8A1A06-D07D-4A72-867B-EEC0F97F8B4F abbreviation network:toggle abbreviationMode 1 creationDate 2012-01-02T17:00:53Z flags 2 label Toggle network interface connection modificationDate 2012-03-18T08:37:23Z plainText ifconfig en0 down ifconfig en0 up snippetType 3 useCount 0 uuidString 20C17850-5A4D-4300-893E-7ECC21371B5C abbreviation ip:get abbreviationMode 1 creationDate 2012-01-02T17:00:05Z flags 2 label Get this machine's network IP address modificationDate 2012-03-18T08:37:16Z plainText ifconfig | grep inet snippetType 3 useCount 0 uuidString CD837C94-B605-441C-8461-51AD75402C71 abbreviation network:list abbreviationMode 1 creationDate 2012-01-02T16:59:27Z flags 2 label Get IP addresses of devices on a network modificationDate 2012-03-18T08:37:09Z plainText ifconfig snippetType 3 useCount 0 uuidString 685D7E86-A3A7-4517-9883-450E3868CAA3 abbreviation uncompress abbreviationMode 0 creationDate 2012-01-02T16:58:02Z flags 0 label Uncompress file lastUsed 2012-03-17T04:13:44Z modificationDate 2012-03-17T04:21:53Z plainText tar -xzvf %fill:file% snippetType 0 useCount 0 uuidString E5B2FB93-CCBF-4712-BEEC-0702B3BE654A abbreviation compress abbreviationMode 0 creationDate 2012-01-02T16:55:59Z flags 0 label Compress files lastUsed 2012-03-17T04:22:39Z modificationDate 2012-03-17T04:25:09Z plainText tar -czf %fill:newfile%.tar.gz %fill:targetfiles% snippetType 0 useCount 0 uuidString B6360782-B3AD-4BF6-973A-4752E0A54805 abbreviation ssh:host:revoke abbreviationMode 1 creationDate 2012-01-02T16:54:44Z flags 2 label SSH revoke key known host modificationDate 2012-03-18T08:37:40Z plainText ssh-keygen -R %fill:hostname% snippetType 3 useCount 0 uuidString 0B586E4B-BCCC-452A-AD13-7B285904AAD0