To add a different point of view to the previous answer, you can always use the reverse-i-search in the terminal, which search through all the commands you have executed.
To use it, press
CTRL+R and try to type same characters to identify your previous command. For example,
CTRL+R and then writing
steam should give you the command you want. Then, just press Enter to execute it.
You can also add a tag to the command to identify it. For example, you can run the program using
LD_PRELOAD='/usr/$LIB/libstdc++.so.6' steam #mytag
#mytag should give you this exact command.
If you still want to use a script, maybe the most immediate way is to execute
echo "LD_PRELOAD='/usr/$LIB/libstdc++.so.6' steam" > steam_script.sh
chmod u+x steam_script.sh
and then launch the file using
./steam_script.sh from the directory in which you have created the file.