Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daggerok/bash-functions
This repository primarily contains my bash (fish) helper functions which I'm using in my daily work or to simplify some jobs with shell script for example testing on Travis CI, etc...
https://github.com/daggerok/bash-functions
bash bash-hacks bash-script bash-scripting fish gradle shell shell-script travis travis-ci
Last synced: 29 days ago
JSON representation
This repository primarily contains my bash (fish) helper functions which I'm using in my daily work or to simplify some jobs with shell script for example testing on Travis CI, etc...
- Host: GitHub
- URL: https://github.com/daggerok/bash-functions
- Owner: daggerok
- License: mit
- Created: 2017-11-14T21:55:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T18:24:22.000Z (over 5 years ago)
- Last Synced: 2024-11-11T15:40:42.748Z (3 months ago)
- Topics: bash, bash-hacks, bash-script, bash-scripting, fish, gradle, shell, shell-script, travis, travis-ci
- Language: Shell
- Size: 119 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= bash-functions image:https://travis-ci.org/daggerok/bash-functions.svg?branch=master["Build Status", link="https://travis-ci.org/daggerok/bash-functions"]
This repository primarily contains my bash (fish) helper functions which I'm using in my daily work
or to simplify some jobs with shell script for example testing on Travis CI, etc...note: expecting use sudeo without password prompt...
.build
[source,bash]
----
bash gradlew clean build
----.usage
[source,bash]
----
# install: curl bash sudo lsof...
# apt-get install -y --no-install-recommends curl bash sudo lsof
# yum install -y ....# import finction into your bash shell
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)# use any function (read next)
----== available functions
__Yeah, by default I love sudo, sorry for that (:__
=== stop_any
.1.1. link:https://raw.githubusercontent.com/daggerok/bash-functions/master/src/stop_any.bash[kill any services by port number]
[source,bash]
----
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/src/stop_any.bash)
stop_any 22 80
----.1.2. link:https://raw.githubusercontent.com/daggerok/bash-functions/master/src/sudo_stop_any.bash[using sudo - same as previous: kill any services by port number]
[source,bash]
----
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/src/sudo_stop_any.bash)
sudo_stop_any 22 80
----.1.3. link:https://raw.githubusercontent.com/daggerok/bash-functions/master/src/non_sudo_stop_any.bash[non sudo kill any services by port number]
[source,bash]
----
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/src/non_sudo_stop_any.bash)
non_sudo_stop_any 10022 10080
----=== wait_for
.2.1. link:https://raw.githubusercontent.com/daggerok/bash-functions/master/src/wait_for.bash[wait for all services (order does matter)]
[source,bash]
----
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/src/wait_for.bash)
wait_for 22 80
----.2.2. link:https://raw.githubusercontent.com/daggerok/bash-functions/master/src/sudo_wait_for.bash[using sudo - same as previous: wait for all services (order does matter)]
[source,bash]
----
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/src/sudo_wait_for.bash)
sudo_wait_for 22 80
----.2.3. link:https://raw.githubusercontent.com/daggerok/bash-functions/master/src/non_sudo_wait_for.bash[non sudo wait for all services]
[source,bash]
----
source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/src/non_sudo_wait_for.bash)
non_sudo_wait_for 10022 10080
----