Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Below Bash Sample Scripts can be found.Please find a collection of Bash Script examples below:

Note

Please be very careful cautious when working with Bash Script and always test your Bash Scripts before entering the production stage.

...

The following Bash Scripts can be used as Stop Recording Events.

Delete the file 10 seconds after the recording

...

has ended

Code Block
languagebash
sleep 10

rm -f "$Just_In_Full_Clipname"

Move

...

High-res and Low-res files after recording and rename

...

the Low-res (Proxy File)

Code Block
languagebash
if [[ "$Just_In_Full_Clipname" == *"Proxy"* ]];
then
	name="$Just_In_No_Extension_Clipname"
	tmp="_Proxy.mov"
	final="$name$tmp"
	mv "$Just_In_Full_Clipname" /Volumes/LAB_INGEST/INGEST/JIM/M1/Final/"$final"
else
	mv "$Just_In_Full_Clipname" /Volumes/LAB_INGEST/INGEST/JIM/M1/Final
fi

...

The following Bash Scripts can be used as Start Recording Events.

Erase all existing files at the given destination except for new

...

recordings

Code Block
languagebash
recordPath=$(echo "$Just_In_Full_Clipname" | rev | cut -d"/" -f2-  | rev)

find "$recordPath/" -type f -not -name '$Just_In_Clipname' -delete

...

It is possible to use Apple Script Code within a Bash Event Preset, for instance, to display information with within a macOS Notification. Please be aware remember to set up the Notification Settings within the macOS System Preferences beforebeforehand.

Code Block
languagebash
osascript -e 'display notification "Started Recording" with title "$Just_In_Channel_Name"'