The first interactive shells were developed in the 1960s to enable remote operation of the first time-sharing systems, and these used shell scripts, which controlled running computer programs within a computer program, the shell.
Languages such as Tcl and Lua were specifically designed as general-purpose scripting languages that could be embedded in any application.