Created
April 12, 2020 14:51
-
-
Save itsDiwaker/9a29dcc6191b516d24f0122ad04415f4 to your computer and use it in GitHub Desktop.
Create snake case mulitple empty files from camel case list of names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
files=( | |
ccPaymentTotal | |
getPaymentByMethodType | |
getTotalPaidByMethodType | |
getPointsBalance | |
getLineItemCountByState | |
getAggregateDiscountTypeForOrder | |
getAggregateDiscountTotalForOrder | |
) | |
for i in "${files[@]}" | |
do | |
echo ${i}.js | sed -E 's/([A-Z])/-\1/g' | tr '[:upper:]' '[:lower:]' | |
done | |
exit $EXT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment