Script

linux

Bash syntax highlighted script

As I said to you, I have done the bash highlighted syntax script, Still it does not highlight many words, but I will try to improve it. If there is some word that is not highlighted, simply add it to the variable KeyWords. Here the code: #!/bin/bash rutaCodigo=`zenity --file-selection --title="Select a File"` case $? in 0) keywords="alias bg bind break builtin case cd command continue declare dirs disown do done echo elif else enable-in esac eval exec exit export fc fg fi for function getopts hash help history if in jobs kill let local logout popd pushd pwd read readonly return select set shift suspend test then time times trap type typeset ulimit umask unalias unset until wait while sed rm IFS cp mv mkdir" sed 's/#.

linux

Bash syntax highlighted script [Improved]

Thanks to DavidRSM, I have improved the highlighted syntax script for bash, and now it allows many more key words. Simply it is necessary to add to the variable keywords the commands names that they find in /bin/, and /sbin/, You can add more key words concatenating them to the variable, this way: keywords=$keywords`ls 'Commands directory'` #!/bin/bash rutaCodigo=`zenity --file-selection --title="Select a File"` case $? in 0) keywords="alias bg bind break builtin case cd command continue declare dirs disown do done elif else enable-in esac eval exec exit export fc fg fi for function getopts hash help history if jobs let local logout popd pushd read readonly return select set shift suspend test then time times trap type typeset ulimit umask unalias unset until wait while" #Agrego mas palabras clave de los directorios sbin y bine, que contienen comandos.