Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Run Shell Script ( shellScript )

Featured Replies

Am I not understanding how "Run Shell Script ( shellScript )" should work under windows? I put in "echo hello world" and I got errors. I then put in ipconfig and filemaker froze completely is there more to this command than I think? Note: I'm on window 7 64-bit if that makes a difference. Below is the error for the echo:

java.io.IOException: Cannot run program "echo": CreateProcess error=2, The system cannot find the file specified



Parameters:

{shellScript=echo Hello}



---Script---

Script:

String[] commands = tokenize( shellScript );



Process process = Runtime.getRuntime().exec( commands );

process.waitFor();



exitValue = process.exitValue();

outputResult = process.getInputStream().getText("utf-8");

errorResult = process.getErrorStream().getText("utf-8");

if (exitValue != 0)

	throw new Exception(errorResult);

return outputResult;



public static String[] tokenize( String input ) {

	input = input.trim();

	String token, nextDelim = "t "";

	StringTokenizer st = new StringTokenizer(input, nextDelim, true );

	List result = new LinkedList();

	while( st.hasMoreTokens() ) {

		String lastValue = "";

		while( true ) { //Loop until a word is found

			token = st.nextToken( nextDelim );

			if( """.equals( token ) ) {

				if( """.equals( nextDelim ) ) break; //This is the closing quote

				else nextDelim = """; //This is the opening quote

			} else if( " ".equals( token ) || "t".equals( token ) ) {

				if( lastValue.length() > 0 ) break;

			} else if( "".equals( token ) ) {

				i...

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.