I was reading this awk scriptawk -F= '{OFS==;gsub(,,;,$2)}1'I want to know what is the function of 1 at the end of it
what is the meaning of 1 at the end of awk script
linux;shell script;awk
An awk program is a series of condition-action pairs, conditions being outside of curly braces and actions being enclosed in them. A condition is considered false if it evaluates to zero or the empty string, anything else is true (uninitialized variables are zero or empty string, depending on context, so they are false). Either a condition or an action can be implied; braces without a condition (as yours begins) are considered to have a true condition and are always executed if they are hit, and any condition without an action will print the line if and only if the condition is met.  The 1 at the end of your script is a condition (always true) with no action, so it executes the default action for every line, printing the line (which may have been modified by the previous action in braces).