Fix a few mistakes in the script
This commit is contained in:
parent
031974f2e6
commit
d1db250a88
3
share.sh
Normal file → Executable file
3
share.sh
Normal file → Executable file
|
@ -3,9 +3,10 @@
|
|||
# Get IP address
|
||||
echo "Your IP address is "$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
if [ "$#" -eq 1 ]; then
|
||||
ln $1 . # Link file to current directory
|
||||
else
|
||||
touch share.txt # Creat the file
|
||||
xdg-open share.txt # Open file in default editor
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue