Shell Code Samples


How to execute a curl command with bash script
Reshma | 4 years, 4 months
result=$(curl -n \
-X POST -H 'Content-Type: application/json' \
"give_url" \
shell curl with shell
How to install and read parquet files using cli
Reshma | 3 years, 11 months
pip install parquet-cli              # install parquet cli tool

parq filename.parquet --head 10  
cli shell parquet
How to untrack/ unstage a file i.e already trackable by git
harika | 4 years, 11 months
git reset HEAD fileName.txt
git shell
To delete all the none docker images in single shot.
ashokrebel007 | 5 years, 2 months
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") --force
shell docker
Shell Script to Monitor Site with Json content
sandeep | 5 years, 10 months
a=`curl --insecure -I SITE-NAME | awk 'NR==1 {print $2}'`
b=`wget -qO- --no-check-certificate SITEN
shell Site-Monitor
Shell Script to Generate the SSH key and display it on output screen also create virtualenv
sandeep | 5 years, 10 months
export PATH=$WORKSPACE/resources/chromedriver/mac:$WORKSPACE/venv/bin:/usr/local/bin:$PATH
export P
shell auto ssh key
How to install Home Brew in mac
Reshma | 4 years, 1 month
/bin/bash -c "$(curl -fsSL"
brew shell mac
How to check the logs around or at particular time in git
harika | 4 years, 11 months
#If you want to check the logs since 1 hour
git log --since="1 hour ago"

git shell
Remote copying (One centos machine to another centos machine)
ashokrebel007 | 5 years, 2 months
scp filename username@ipaddress:destinationpath

For example :
shell centos
copy a file and replace with another or original file
kishore_kumar | 5 years, 5 months
# way1

cp -f /path/to/file1.txt /another/path/to/file1.txt