Monday, 17 August 2015

Will this script do what I want it to?


so, first attempt @ writing shell script.
have syntax correct?
need other save .txt file?
intend trigger shortcut manager such keyboard maestro, ikey or spark.


code:
#!/bin/bash    # script increase security of particular file before manually uploaded cloud storage  #  service encrypting openssl symetric encryption.    # remove existing file, don't need keep past versions of file.    rm -rf /users/myusername/path/to/folder/file    # wait moment    sleep 1    # openssl commands encrypt file , place in desired folder. same folder   # cleared out in step one. use passphrase specified on first line of password.txt  # our purposes ok have password stored in plaintext file locally.    openssl enc -aes-128-cbc -salt -in users/myusernmae/path/to/the/filetoencrypt -out /users/myusername/path/to/file -pass file:/users/myusername/path/to/secret/password.txt    
 

wirelessly posted (mozilla/5.0 (ipod; u; cpu iphone os 4_3_5 mac os x; en-us) applewebkit/533.17.9 (khtml, gecko) version/5.0.2 mobile/8l1 safari/6533.18.5)

use meaningful extension .bash distinguish other files.

you'll have set file permissions executable.

lastly, you'll either have execute ./filename within it's folder, via full path, or place folder path in path environment variable.
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment