[CLUE-Tech] starting openoffice from the command line
Keith Christian
keithchristian at yahoo.com
Wed Jan 7 21:51:33 MST 2004
I have a shell script called "oo.sh" that works fine. "soffice" is the
executable.
#!/bin/bash
# Run Open Office against a desired file
# Finalized Wed Dec 3 11:34:35 MST 2003 Keith Christian
#
EXTENSIONS="sxw sxc sxd sci sxm sxg"
THEFILE=$1
if [ -z ${THEFILE} ]; then
TEMPFILE=$(date '+%Y%m%d_%H%M%S').sxw
touch ${TEMPFILE}
echo " Using ${TEMPFILE} as a new blank OO word processing document"
~/OpenOffice.org1.1.0/soffice "${TEMPFILE}" &
elif [ -d ${THEFILE} ]; then
echo " ${THEFILE} is a directory, please use a filename instead."
else
echo ${THEFILE} | grep -q "/"
if [ $? -eq 0 ]; then
OOFILE="${THEFILE}"
else
OOFILE="$(pwd)/${THEFILE}"
fi
~/OpenOffice.org1.1.0/soffice "$OOFILE" &
fi
#End of oo.sh script
Set up an alias or shell function, or rename it to "oo" and have fun.
=====Keith
--- Jay Seven Ess <j7s12b at earthlink.net> wrote:
> On Wednesday 07 January 2004 06:46, Jason S. Friedman wrote:
> > How does one launch an openoffice application, such as the
> > spreadsheet from the command line?
> >
> > I tried the instructions listed in
> > http://www.math.hmc.edu/computing/support/applications/openoffice/
> > and pages similar to it, but that causes an installation
> > program to start. I know it's already installed, I can
> > launch it from the Fedora Core toolbar.
>
> I started Oo Calc from the menu and then on the command line did..
> $ ps -aux | grep office
>
> which returned "/usr/lib/openoffice/program/soffice.bin
> private:factory/scalc"
>
> issuing that line on the command line started the Calc spreadsheet program
> for me.
>
> J
>
> _______________________________________________
> CLUE-Tech mailing list
> Post messages to: CLUE-Tech at clue.denver.co.us
> Unsubscribe or manage your options:
http://clue.denver.co.us/mailman/listinfo/clue-tech
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
More information about the clue-tech
mailing list