Skip to content

Commit

Permalink
feat: adding simple project for get ip information (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
rulanugrh authored Oct 4, 2024
1 parent 903d1d2 commit 1a8c175
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions simple_project/get_ip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

name="Get IP"

case $1 in
-h | --help)
echo "$nama"
echo "usage: get_ip [opsi]"
echo "-h | --help menampilkan command detail"
echo "-i | --ip menampilkan detail ip"
;;
-i | --ip)
curl ipinfo.io/$2
;;
*)
curl ipinfo.io
;;
esac

0 comments on commit 1a8c175

Please sign in to comment.