You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
#!/bin/bash
|
|
|
|
CMD_1=$1
|
|
CMD_2=$2
|
|
|
|
ONENOTE_EXE="/mnt/c/Program Files/Microsoft Office/root/Office16/ONENOTE.EXE"
|
|
ONENOTE_CMD="/hyperlink"
|
|
|
|
|
|
arr_cmds=("")
|
|
arr_links=("")
|
|
|
|
arr_cmds+=("jorg")
|
|
arr_links+=("onenote:https://arrowelectronics-my.sharepoint.com/personal/kerem_yollu_arrow_com/Documents/Kerem%20@%20Work/Teams.one#Jörg§ion-id={7964922E-F556-4D32-9719-9110CE683A03}&page-id={27CA5C72-9E93-4C87-BF75-E3D761B9F968}&end")
|
|
|
|
arr_cmds+=("sius")
|
|
arr_links+=("onenote:https://arrowelectronics-my.sharepoint.com/personal/kerem_yollu_arrow_com/Documents/Kunde/Sius.one#20.08.2021%20IR%20sensor§ion-id={58C4B23C-1D45-47A5-B45A-03EBA63DF567}&page-id={E1554726-D580-44DC-9171-E7EFBD5C0E3D}&end")
|
|
|
|
|
|
index=1
|
|
|
|
goto_folder ()
|
|
{
|
|
for list in "${arr_cmds[@]}"
|
|
do
|
|
for item in $list
|
|
do
|
|
if [ "$item" == "$CMD_1" ]
|
|
then
|
|
exec "$ONENOTE_EXE" $ONENOTE_CMD ${arr_links[$index]}
|
|
fi
|
|
((index=index + 1))
|
|
done
|
|
done
|
|
echo Comman not found : $CMD_1
|
|
exit
|
|
}
|
|
|
|
check_command ()
|
|
{
|
|
if [ -z "$CMD_1" ]
|
|
then
|
|
echo no argument was given
|
|
else
|
|
goto_folder
|
|
fi
|
|
}
|
|
|
|
check_command
|