So I want a shell script to open a program, wait 45 minutes, close it, and then do it all again. I want to do this because I am running an iMacros Script for a long period of time and if Firefox is not constantly restarted, memory leaks start to happen.
Anyway heres my script:
When I open it using "sh /root/whatever.sh" I get this error:
"line 12: syntax error near unexpected token 'done'"
"line 12: done"
Can anyone help? thanks!
edit: oh yeah, for anyone who isnt familiar to iMacros scripting, running the macro twice after 5 seconds is needed because firefox is not properly loaded during this time
If you're saying that it takes firefox 5 seconds to load before you can run your iMacros script; why not start firefox, sleep 5 seconds, and then launch your iMacros script instead of starting the script twice when you know the first one will fail and maybe leave firefox in an "unknown" state.
The error messages you're getting are from line 12 in some script that isn't identifying itself. Since there are only 9 lines in the shell script you're showing us, this script isn't producing the error. Could the error message be coming from the iMacros script that is failing to start properly?
Rather than killing firefox, it would be much better to debug your iMacros script to stop leaking memory.
What do you see if you run the command:
at a time when firefox is not running?
What do you see if you run the same command when firefox is running?
Please send an email to the administrator(s) of the board with thead ID and forum for any thread that is closed that you want open (or open that you want closed). All requested considered. Our apologies if sometimes threads are closed early. If this happens, please email :)
Nobody is perfect... (0 Replies)
Discussion started by: Neo
0 Replies
2. Post Here to Contact Site Administrators and Moderators
Hi all,
Just thought I'd mention something I've noticed since joining this forum :)
Would it be a good idea to close threads once the initial question that was posted has been answered?
I notice a few posts where people go on and on and as soon as you post a reply to one question they... (2 Replies)
Hi All,
Actually when i am trying to open my shell script file 1.sh then i am getting the following error.
> vi 1.sh
"/var/tmp/ExdNaarK" No space left on device
Can anybody tell me that how to rectify it. It is very urgent. Because i am not able to do any work due to the above error.
... (1 Reply)
I am using a shell script to telnet into a remote unix server and execute certain commands. But if any command being executed remotely, throws an error, the script just hangs. And the telnet session does not get closed.
I want to be able to close the session and complete the script execution in... (1 Reply)
I am reading a cpp file thru shell script . There are many fuctions inside the cpp file
eg
pvvd_fncn_name1
{
..... something
}
pvvd_fncn_name2
{
..... something
}
what I require is a method to find the first opening brace and the coresponding last brace and search... (2 Replies)
Hi,
I am trying to open a file that I have created from withn a shell script and cannot seem to get it working. Does anyone have any ideas?
Thanks. (2 Replies)
Hi,
Is the below possible (SHELL = tcsh)?
-- I want to write an 'alias' something like this -
alias set_my_work "setenv SOME_VAR;tcsh -i;source work_script.cshrc"
The intention is to run this alias and enter a child shell, at the same time ensuring that the work_script.cshrc is source-ed.... (0 Replies)
I have a shell script that does everything I need it to do. But, when I was testing it I realized it doesn't print the closing XML tag.... Does anyone know how to incorporate printing the XML tag with my script? I am using AWK any help would be appreciated. (4 Replies)
Running Xubuntu 16.04 with shell version "GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)," I have a working script that consistently renames a Chrome window:
#!/bin/sh
while sleep 1; do
xdotool search --name chrome 2>/dev/null | while read id; do
xdotool set_window --name... (21 Replies)
Discussion started by: jakefish
21 Replies
LEARN ABOUT CENTOS
firefox
FIREFOX(1) Linux User's Manual FIREFOX(1)NAME
firefox - a Web browser for X11 derived from the Mozilla browser
SYNOPSIS
firefox [OPTIONS] [URL]
firefox-bin [OPTIONS] [URL]
DESCRIPTION
Mozilla Firefox is an open-source web browser, designed for standards compliance, performance and portability.
USAGE
firefox is a simple shell script that will set up the environment for the actual executable, firefox-bin.
OPTIONS
A summary of the options supported by firefox is included below.
GTK options
--gdk-debug=FLAGS Gdk debugging flags to set
--gdk-no-debug=FLAGS
Gdk debugging flags to unset
--gtk-debug=FLAGS
Gtk+ debugging flags to set
--gtk-no-debug=FLAGS
Gtk+ debugging flags to unset
--gtk-module=MODULE
Load an additional Gtk module
X11 options
--display=DISPLAY
X display to use
--sync Make X calls synchronous
--no-xshm
Don't use X shared memory extension
--xim-preedit=STYLE
--xim-status=STYLE
--g-fatal-warnings
Make all warnings fatal
Firefox options
-h, -help
Show summary of options.
-v, -version
Print /usr/bin/firefox-bin version.
-CreateProfile profile
Create profile.
-P profile
Start with profile.
-ProfileManager
Start with profile manager.
-remote command
Execute command in an already running Firefox process. For more info, see: http://www.mozilla.org/unix/remote.html
-jsconsole
Start with Javascript Console
-chrome url
Load the specified chrome.
-no-remote
Don't connect to any other running instances of firefox. Use this if you want to run firefox in an entirely new process. By default,
firefox will delegate a command to an already running instance.
-safe-mode
Start firefox in safe-mode. This disables all third-party extensions, and may be necessary if you are having problems with an exten-
sion you installed.
-new-tab url
Open url in a new tab.
-new-window url
Open url in a new window.
-preferences
Open the preferences dialog.
-private
Start firefox in private browsing mode.
-private-toggle
Toggle private browsing mode.
-setDefaultBrowser
Set firefox as the default web browser.
-search term
Search for term with your default search engine.
-migration
Start with migration wizard.
-new-instance
Open new instance, not a new window in running instance.
FILES
/usr/bin/firefox - shell script wrapping firefox
/usr/lib/mozilla/firefox-bin - firefox executable
VERSION
1.0
BUGS
To report a bug, please visit http://bugzilla.mozilla.org/
SEE ALSO mozilla(1)AUTHORS
The Mozilla Organization
http://www.mozilla.org/about.html
firefox August 07, 2001 FIREFOX(1)