That is a difficult question to answer - the question is rather vague on what you intend to do. An awk script is a file containing awk commands that operate on 1 or more data files, based on selectors and actions resulting from that selector.
It all depends on what you want to do with the data. The program itself is just a text file that can be created by any editor and then interpreted with the awk command.
The awk programming/scripting language is used to pattern match text and then do something with the result. Using the -f option indicates that the awk program/script has been stored in an external file instead of being specified inline with the command.
This is used when you want to give a variable in an awk script a value before the script starts executing, even before the BEGIN block. You would do this on the command line if the variable needs different values for different executions rather than hardcoding it in the awk script itself.
You will have to be more specific about what you intend to do. In general, a shell script by itself does not read file information and then do something with it. There may be calls to other scripting languages such as awk, perl, python, etc., that will actually read the information and process the data.
Hard to answer - you don't say where the duplicated line might be.
They both are frequently used programs in UNIX, but they do different things. Read their manuals if you want to use them.
The AWK programming language is a Unix based programming language, and is sometimes considered as a pseudo-C interpreter. It is mainly used for sifting through and organizing large amounts of data at one time.
AWK is a programming language developed in 1977 by Alfred Aho, Peter Weinberger, and Brian Kernighan. It is was developed as a text-processing language - it has simple syntax to match lines of patterns, separate out the fields, and operate on them.
cat FILE | awk 'gsub(/ /,"\n") gsub("\n","\n") {print}' | sort -ur
In AWK, once you have a successful selector then the action could be to print the resulting line (if thats what you wish to do). For example, /a test/ { print ; } would match (and print) all lines containing "a test"
The oerr utility (Oracle Error) is provided only with Oracle databases on UNIX platforms. oerr is not an executable, but instead, a shell script that retrieves messages from installed message files. The utility is not provided on Windows systems, since it uses awk commands to retrieve the requested text from the file.
clear echo -n "Enter the Name / String:" while : do read name echo $name | awk '{print gsub(/[aeiou]/,"")}' done
This can be done any number of ways in the Unix operating system. Using 'sed', you can use the address range to limit what you are printing, such as: sed -e '1,5p' < filename To just list lines 1 - 5 of a file, or the AWK or Perl scripting languages to do the same type of thing.