-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaunchAllBrowsers.sh
48 lines (39 loc) · 1.12 KB
/
LaunchAllBrowsers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
#
# @(#)$Id$
#
#
# Open a link in all of your installed browsers
# ****************************************************************************************************
# $ launch-all-browsers [URL]
#
# ****************************************************************************************************
#
# 1. Make sure this script is executable
# $ chmod u+x LaunchAllBrowsers.sh
#
# 2. Add to your PATH
# Either by editing your ~/.profile or ~/.bashrc file:
# export PATH="$PATH:/path/to/launch-all-browsers"
#
# OR
#
# Adding a symlink:
#
# $ cd /usr/local/bin
# $ sudo ln -s /path/to/launch-all-browsers/LaunchAllBrowsers.sh launch-all-browsers
#
# ****************************************************************************************************
# Make sure URL was passed
if [ "$1" != "" ]; then
cmdChromium=$( type -p chromium 2>&1 )
if [ "$cmdChromium" != "" ]; then
nohup $cmdChromium "$1" >/dev/null 2>&1 &
fi
cmdFirefox=$( type -p firefox 2>&1 )
if [ "$cmdFirefox" != "" ]; then
nohup $cmdFirefox "$1" >/dev/null 2>&1 &
fi
else
exit 1
fi