Hi..
I am trying to popup 53 uri's in single firefox window in tabs..But using the given code am getting it in different windows..Can anyone check dis out..n help me to correct it..

#!/bin/bash
processLine(){
 line="$@"
  # F1=$(firefox $line?wsdl | awk '{ print $1 }')
#firefox -new-tab "$line?wsdl"
 firefox $line?wsdl
#firefox -remote "openURL($line?wsdl, new-tab)"
# killall -9 firefox
#firefox $line?wsdl,new-tab 
}

if telnet trainee1.ctsf.cdac.org.in 8443 < /dev/null 2>&1 | grep -q Connected
then
echo port is fine

#else
#echo port  is down!
#fi
FILE=""
if [ "$1" == "" ]; then
   FILE="/dev/stdin"
else
   FILE="$1"

   if [ ! -f $FILE ]; then
        echo "$FILE : does not exists"
        exit 1
   elif [ ! -r $FILE ]; then
        echo "$FILE: can not read"
        exit 2
   fi
fi
BAKIFS=$IFS
IFS=$(echo -en "\n\b")
exec 3<&0
exec 0<"$FILE"
while read -r line
do
 #firefox -new-tab "$line?wsdl"
        processLine $line
done
exec 0<&3
IFS=$BAKIFS
else
echo port is down
fi
exit 0

Edited 3 Years Ago by Reverend Jim: Fixed formatting

Firefox doesn't guarantee a command line interface, though by tradition, several options have been available and are likely to continue so. Among other things, Firefox's configuration may modify how new views are displayed (tabbed or windowed).
I might prefer to create a simple HTML page that has links to the necessary files or some similar thing; then start whatever browser the user prefers, looking at the dispatch page.

This article has been dead for over six months. Start a new discussion instead.