Skip to content

Instantly share code, notes, and snippets.

@abhi2495
Last active March 3, 2022 13:24
Show Gist options
  • Save abhi2495/f5cdf5d2860eff3887fa80b28a784d83 to your computer and use it in GitHub Desktop.
Save abhi2495/f5cdf5d2860eff3887fa80b28a784d83 to your computer and use it in GitHub Desktop.
Extract UserId , Password from connection string like this:
"Server=sampledb.database.windows.net;Database=dynamicpricing;User Id=dummyuser;Password=abcd"
userId=$(echo "${{ secrets.DATABASE_CONNECTION_STRING }}" | sed -n "s/^.*User\sId=\([^;]*\).*$/\1/p")
password=$(echo "${{ secrets.DATABASE_CONNECTION_STRING }}" | sed -n "s/^.*Password=\([^\"]*\).*$/\1/p")
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
Zip Contents of the folder without the folder
cd myfolder
zip -r filename.zip .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment