Find Interview Questions for Top Companies
Ques:- What is the use of ARGV ?
Asked In :- Kaynes Technology Inc,
Right Answer:
ARGV is an array in AWK that contains the command-line arguments passed to the script, allowing the script to access those arguments during execution.
Ques:- What is the use of ARGIND?
Asked In :-
Right Answer:
`ARGIND` is a built-in variable in AWK that represents the index of the current input file being processed in the `ARGV` array. It indicates which file is currently being read when multiple files are specified.
Ques:- What is the use of FNR?
Asked In :-
Right Answer:
FNR is a built-in variable in AWK that represents the current record number in the current input file. It resets to 1 for each new input file.
Ques:- What is the use of OFMT?
Asked In :-
Right Answer:
OFMT is a built-in variable in AWK that defines the output format for floating-point numbers. By default, it is set to "%.6g", which means numbers are printed with six significant digits.
Ques:- What are System functions?
Asked In :-
Right Answer:
System functions in AWK are built-in functions that provide information about the environment or control the execution of the program. Examples include `system()`, which executes a shell command, and `getline`, which reads input from a file or standard input.
Ques:- What is the use of systime function?
Asked In :-
Right Answer:
The `systime` function in AWK returns the current system time as the number of seconds since January 1, 1970 (the Unix epoch).
Ques:- What is the use of Strftime function?
Asked In :-
Right Answer:
The `strftime` function is used to format date and time in a specified string format.
Ques:- What are AWK patterns?
Asked In :-
Right Answer:
AWK patterns are conditions that determine when an action should be executed in an AWK program. They can be based on record content, such as matching specific strings, regular expressions, or conditions like line numbers. If a pattern is true for a record, the associated action is performed.
Ques:- What is the use of string function strtonum(string)?
Asked In :-
Right Answer:
The `strtonum(string)` function in AWK converts a string representation of a number into a numeric value. If the string cannot be converted, it returns 0.
Comments
Admin May 17, 2020

strtonum() will reliably convert a string representation of a number into an integer number. It's reliable because you can pass the min and max value that the you want the input to be within and strtonum() will return an error code if the number falls outside the specified range. This function however expects only 1 '-' symbol to exist in the input and returns a long long integer.

Ques:- What is the use of string function asorti(string,[d])?
Asked In :-
Right Answer:
The `asorti(string, [d])` function in AWK sorts the elements of an associative array `string` by their keys and stores the sorted keys in a numerically indexed array. The optional argument `d` can be used to specify the sort order (ascending or descending).
Ques:- What is the use of string function gensub(r,s,h [,t])?
Asked In :-
Right Answer:
The `gensub(r, s, h [, t])` function in AWK is used to perform a substitution on a string. It replaces occurrences of the regular expression `r` with the string `s` in the target string `h`. The optional argument `t` specifies which occurrence to replace (default is all occurrences).
Ques:- What is the use of string function asort(string,[d])?
Asked In :-
Right Answer:
The `asort(string, [d])` function in AWK is used to sort the elements of a string array in ascending order. The optional parameter `d` can be used to specify the sorting order (e.g., numeric or dictionary order).
Ques:- What is the use of string function tolower(string)?
Asked In :-
Right Answer:
The `tolower(string)` function in AWK converts all uppercase letters in the given string to lowercase.
Ques:- What is the use of string function toupper(string)?
Asked In :- walton group,
Right Answer:
The `toupper(string)` function in AWK is used to convert all lowercase letters in the specified string to their uppercase equivalents.
Ques:- What is the use of string function match(string,regex)?
Asked In :-
Right Answer:
The `match(string, regex)` function in Awk is used to check if a given string matches a specified regular expression (regex). It returns the position of the match in the string if found, or 0 if there is no match.
Ques:- What is the use of string function sub(regex,replacement)?
Asked In :-
Right Answer:
The `sub(regex, replacement)` function in Awk is used to replace the first occurrence of a substring that matches the regular expression `regex` in a string with the specified `replacement`.
Ques:- What is the use of string function sub(regex,replacement,string)?
Asked In :-
Right Answer:
The `sub(regex, replacement, string)` function in Awk is used to replace the first occurrence of a substring that matches the regular expression `regex` in `string` with `replacement`.
Ques:- What is the use of string functiong sub(regex,replacement)?
Asked In :-
Right Answer:
The `sub(regex, replacement)` function in AWK is used to replace the first occurrence of a substring that matches the specified regular expression (`regex`) with a given `replacement` string in the input text.
Ques:- What is the use of string functiong sub(regex,replacement,string)?
Asked In :-
Right Answer:
The `sub(regex, replacement, string)` function in Awk is used to replace the first occurrence of a substring in `string` that matches the regular expression `regex` with `replacement`.
Ques:- What is the use of string function length(string) in AWK?
Asked In :-
Right Answer:
The `length(string)` function in AWK returns the number of characters in the specified string.


The Unix category on takluu.com is designed for IT professionals and developers preparing for interviews that require a strong understanding of Unix operating systems. Unix has been the backbone of many enterprise systems due to its stability, security, and multitasking capabilities.

This section covers key topics such as Unix file system architecture, shell scripting, process management, file permissions, user management, and networking commands. You will also learn about vi editor, cron jobs, package management, and system monitoring tools.

Interview questions often assess your proficiency in writing shell scripts, automating tasks, troubleshooting system issues, and managing user permissions. Candidates may be tested on commands like grep, awk, sed, find, and piping techniques, as well as understanding system boot processes and kernel basics.

Roles such as Unix Administrator, DevOps Engineer, System Engineer, and Backend Developer often require expertise in Unix environments. This category also includes best practices for security hardening, backup strategies, and performance tuning in Unix systems.

At Takluu, we offer detailed tutorials, practical exercises, and interview question sets that will help you build confidence and excel in your Unix-related interviews.

Whether you’re a beginner or looking to deepen your Unix skills, this category equips you with comprehensive knowledge to manage Unix systems efficiently and advance your career.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users