2017-08-01から1ヶ月間の記事一覧
require 'aws-sdk' client = Aws::S3::Client.new( access_key_id: 'your-aws-access-key-id', secret_access_key: 'your-aws-secret-access-key', region: 'your-region') client.put_object( bucket: 'target-backet-name', key: 'sample.txt', body: File…
OptionParser.parse(["--show-all"], [switches: [show_all: :boolean]]) # => {[show_all: true], [], []} OptionParser.parse(["--show_all"], [switches: [show_all: :boolean]]) # => {[], [], [{"--show_all", nil}]} Elixir converts switches to unde…
#!/bin/bash for f in $*; do if [ -f $f ]; then echo "file '$f' IS EXISTS" elif [ -d $f ]; then echo "'$f' IS DIRECTORY" else echo "'$f' IS NOT EXISTS" fi done