add generic_func
This commit is contained in:
10
generic_func.sh
Executable file
10
generic_func.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
function view_file(){
|
||||
sys_name=`uname -s`
|
||||
if [[ ${sys_name} == 'Linux' ]]; then
|
||||
xdg-open ${1}
|
||||
elif [[ ${sys_name} == 'Darwin' ]]; then
|
||||
open ${1}
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user