Shell Programming Shell Code Samples



Filters


How to find the port which is running and stop the process
Reshma | 5 years, 9 months
sudo lsof -i tcp:port //To find the port which is running

kill pid //kills the process which is r
shell kill port
How to install Home Brew in mac
Reshma | 5 years, 3 months
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew shell mac
How to unzip tar file through cli
Reshma | 5 years, 2 months
tar -xvf filename.tgz
cli shell tar
How to uninstall docker from mac
Reshma | 5 years, 9 months
#!/bin/bash

# Uninstall Script
run it with sudo bash uninstall.sh
shell docker remove mac
Stop or remove all docker containers command
kishore_kumar | 6 years
# docker ps -a -q  -> will return all ids of all containers
docker stop $(docker ps -a -q)
docker 
shell docker
get logs in oneline / readable form in git
harika | 6 years, 1 month
git log --oneline --graph --decorate
git shell
Rename or change git branch name
kishore_kumar | 6 years, 5 months
git branch -m <old-name> <new-name>
git push origin :<old-name> <new-name>
git shell
ashokrebel007
Gitlab tags
ashokrebel007 | 6 years, 4 months
git tag -a versionnumber -m "versionmessage"
git push origin versionnumber
git shell
Return a string from shell function
harika | 6 years, 4 months
#!/bin/sh

hello()
string shell
How to unzip file in terminal
Reshma | 5 years, 9 months
unzip file_name
we should have to be in the directory where the file exists.
shell unzip
Prev Next