Everything from "am" to the end needs to be on one line, but it's too long to post it that way here and I've always found the typical way of splitting lines on the web with a backslash confuses people, so just make sure "am...}" goes on a single line or copy it from the QR code below.
To run it, just execute the script with the name of an sl4a script as an argument. e.g., if you name the script slsh you run "slsh test.py"
#! /system/bin/sh
[ -z "$1" ] && exec echo "please specify the name of a script to run"
am start -a com.googlecode.android_scripting.action.LAUNCH_BACKGROUND_SCRIPT
-n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher
-e com.googlecode.android_scripting.extra.SCRIPT_PATH /sdcard/sl4a/scripts/${1}
This could give you the ability to do virtually anything on the phone through the command line by invoking sl4a scripts. sl4a would do the hard work, of course, but this gives you a lower level access to it. You could, for example, probably use it to easily ssh into the phone from the computer and send a text message or get the GPS location.
Copy "slsh" to your phone's clipboard with this QR code: