aws s3のcliでs3 lsを使ってディレクトリだけ取得する

sedを使っていらないものを削除。

sed のオプション

source  awsc.sh ; aws s3 ls   s3://bucketname/path/to/file/ | awk '{print $2}' |sed -E '/.*[^\/]$/d' > folders.txt