I have S3 bucket path like
s3://my-dev-s3/apyong/output/public/file3.gz.tar
I want to fetch all characters after first "/" (not //) and before last "/" . So here output should be
apyong/output/public
I tried awk -F'/' '{print $NF}' .But its not producing correct results.