Shell Programming Shell Code Samples



Filters


How to execute a curl command with bash script
Reshma | 4 years, 3 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, 10 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, 10 months
git reset HEAD fileName.txt
git shell
ashokrebel007
To delete all the none docker images in single shot.
ashokrebel007 | 5 years, 1 month
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") --force
shell docker
sandeep
Shell Script to Monitor Site with Json content
sandeep | 5 years, 9 months
a=`curl --insecure -I SITE-NAME | awk 'NR==1 {print $2}'`
b=`wget -qO- --no-check-certificate SITEN
shell Site-Monitor
sandeep
Shell Script to Generate the SSH key and display it on output screen also create virtualenv
sandeep | 5 years, 9 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
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew shell mac
How to check the logs around or at particular time in git
harika | 4 years, 10 months
#If you want to check the logs since 1 hour
git log --since="1 hour ago"

git shell
copy a file and replace with another or original file
kishore_kumar | 5 years, 4 months
# way1

cp -f /path/to/file1.txt /another/path/to/file1.txt
shell
ashokrebel007
Remote copying (One centos machine to another centos machine)
ashokrebel007 | 5 years, 1 month
scp filename username@ipaddress:destinationpath

For example :
shell centos
Next