
Learn how awk enables data processing, pattern scanning, and data manipulation for large files. Transform inputs into fields, perform arithmetic operations, apply conditions and loops, and generate formatted reports.
Discover advanced Unix file processing with awk, sed, and grep, from column selection and data extraction to conditional filtering, replacements, and loops.
Set up Unix or Linux on Windows by installing VirtualBox, downloading an Ubuntu image, and creating a virtual machine to practice commands in the terminal.
Set up test data for practice by downloading three sample files, comma separated, pipe separated, and space separated, for AWK and SED practice in Unix/Linux.
Master basic AWG commands to fetch data from a space separated file, selecting single or multiple columns or all columns, with optional separators and custom column order.
Discover how to extract columns in awk by setting a separator with -F, handle space, comma, pipe, and hash separated data, and print specific columns.
Learn to use awk to fetch data by row number or range, filter specific rows, skip or include header, and select columns with -F and print commands.
Learn how to save the output of an awk command to a file using the redirection operator, creating a new file with the command results for later use.
Learn to filter data with awk by applying conditions on numeric and string columns, selecting specific fields, and printing complete rows from a comma-separated file.
Learn to filter records with awk using the logical and operator to require two conditions. Use a field separator and print only complete records that satisfy both conditions.
Apply awk to filter records with multiple conditions using the logical or operator, selecting rows where values in columns meet one condition or another, and print relevant fields.
Master awk substring filtering by matching anywhere in a line or within a chosen column, using patterns with double slash, -F, and not conditions such as gmail.com or country names.
Learn to use awk and sed for advanced unix file processing by finding records that match conditions, such as user id equals root and numeric fields exceed thresholds.
Learn how to use awk to find records whose second column starts with a given letter by anchoring the start of the line, printing full lines along with the filename.
Explore how AWK can match text at the end of a line, print full records, and combine start-of-line and end-of-line conditions to filter results.
Learn to process Unix files with awk and sed by extracting running processes, filtering records by substring in the last column, and locating lines that begin with a pattern.
Learn to find records containing data anywhere in a row or in a specific column using awk and sed, including target columns like A or S10, and select matching records.
Use awk with if and if-else to filter records by column values using the pipe-delimited fields, such as salary greater than 20000 or 30000, and combine conditions with logical operators.
Learn awk conditional checks in unix/linux by using if-else with field separators to print names based on salary thresholds and alternative actions.
Explore how awk handles condition checks with if, else if, and else to apply salary-based rules and tax percentages, using multi-line scripts and field-based processing.
Apply awk and sed to search and change data in a file, converting root user entries to superuser and updating records based on the user column.
Use awk begin block to initialize variables and print a header before processing. Filter records where column 3 is 10000, print the line, and double salary when matched.
Learn how AWK end block uses begin and action blocks to test conditions like column 3 equals 10000, print results, and count matching records.
Master awk's while loop to print each line of a file twice, controlled by a variable, and handle column separators during file processing.
Learn to implement an awk for loop to process a file, duplicate every line, and format records by columns using a separator, printing fields like id and name in sequence.
Learn to capture a command's output into an awk variable and display that variable, enabling practical file processing with awk in Unix/Linux.
Learn how to run awk code without a file name by using the begin block, and understand begin, action, and end blocks to execute commands with or without input files.
Learn to split a file into two columns using awk with a comma separator and apply printf formatting to display string and numeric data correctly.
split a file into multiple files by column data using awk, keeping only selected columns such as employee no, last name, and first name in the target files.
Explore using awk to extract last names from a comma-separated file and apply the length string function to display the name alongside its character count.
Learn to convert strings to upper and lower case with to upper and to lower in awk, and print last and first names from fields $2 and $3.
Explore replacing values in a CSV-like file with awk using sub for first occurrence and gsub for all occurrences, targeting columns (e.g., $1, $2) and printing updated fields.
Explore awk's index and substr functions to locate a substring's position in a column and to extract a four-character substring starting at position one.
This lecture explains printf basic formatting, compares printf with print, and demonstrates using format specifiers and column arguments to format and display data across single or multiple rows.
Explore printf formatting in awk with tab and pipe separators, printing two columns, excluding the header row, and adjusting spacing with multiple tabs and pipes.
Learn to format string columns using printf in awk, define column width and alignment (default right, left with a hyphen), and display multi-column output.
Explore printf number formatting in awk, learning how to set column width and alignment for numeric data. Practice left alignment and zero padding to display zeros before numbers.
Explore sed, the stream editor, and practice insertion, deletion, updating, and searching text. Use line number addressing and context addressing to modify or delete lines, e.g., lines with hello.
Learn how to use sed to display a line multiple times and to extract only a specific line from a file, with practical examples for second, third, and fifth lines.
learn how to use sed to display the last line and a range of lines in a file, using the dollar sign and hyphen notation.
Explore using sed to skip lines and display ranges in a file, including excluding single lines and specific ranges, with practical terminal examples.
Learn to use sed for context addressing to display lines by a word match, and perform case-insensitive searches to show lines containing a specific term.
Learn how to use sed to search data and save results to a file with the write flag, creating and viewing output files for later use.
Learn how to substitute data in a file with sed using s/old/new/ to replace values like 10000 with 15000 across the document.
Use sed to perform multiple substitutions in one command, replacing 10000 with 15000 and 20000 with 25000 in a single operation.
Learn how to use sed to substitute data conditionally, replacing 10000 with 15000 only when the name is Johnny in a file.
Learn to delete lines from a file with sed, perform case-insensitive matches, and remove multiple matching lines in unix/linux file processing.
Learn to insert data into a file with sed, including inserting on the first line and at the end, demonstrated through practical terminal examples.
Learn to search data in files using grep, matching lines in csv and text files, filtering by keywords like 2010, 2008, or female.
Learn to search data across multiple files with grep, locating lines containing terms in hotels and movies. See results show file names and matching lines across any number of files.
Learn to search data across all files in the current directory using grep. Use wildcards like * and . to match files and extensions, enabling multi-file results.
Learn to search data in files using case-insensitive grep across multiple files, by applying the -i option and flexible patterns such as star dot star to match any case.
Use grep -n to search data and display the line numbers of matching lines in files, with examples from movies and hotels.
Learn to use grep with the -l option to display only file names containing a search term, and use -i for case-insensitive matching across multiple files.
Use grep to search for exact words, not substrings, with -w and -i (ignore-case), illustrated by John and 38 examples across files.
Learn to search data by excluding given text using grep -v, with case-insensitive options, to find records not containing specific terms.
Count matches with grep using the -c option to display only the number of occurrences. Explore practical examples and case-insensitive searches with -i.
Search data with grep and display surrounding lines around matches using -B, -A, or -C, with -n for line numbers and -i for ignore case.
Learn to perform extended searches with grep -e to find multiple terms in a file, ignore case with -i, and display the matching lines with line numbers.
Learn to search multiple patterns with egrep, the extended grep, using -e. Apply -i for ignore case and -n to show line numbers in movies dot csb.
Learn to use a direct command in the terminal to display all processes saved to a file, then filter lines to find records containing or not containing the word bin.
Save all records to a file, search records, count the number of columns, and print line numbers in front of each matching line using awk and sed.
Complete a filtering task by displaying only two matching records instead of the full set, building from the previous sessions and focusing on precise record selection.
Use the cut command to extract specific character positions or ranges from column-formatted data, retrieving the first character or a defined range to the end of each line.
Master extracting specific columns from comma-delimited files with the cut command by setting a delimiter and using -f to select fields, including single columns and ranges like 1-3.
Explore the cut command in advanced unix/linux file processing to display specific column ranges, skip columns with --complement, and customize delimiters using -d, -f, and --output-delimiter.
Learn to use the cut command to skip non‑column formatted lines by specifying a delimiter and selecting the third to fifth columns, and understand why lines without columns are skipped.
Quit a file without saving changes in the editor, or save edits before exiting. Understand how insert mode and changes influence whether you discard or keep edits.
Discover how to view help for any command in unix/linux, using the help option to see available options. Navigate and exit the help in the terminal.
Learn to view and edit the content of a file in a terminal, using insert mode and save or save as to update and verify changes.
Learn how to insert data into a file using Vim, including entering insert mode, inserting at the position or start of a line, and saving or discarding changes.
Explore inserting data into a file at the current line, before or after, using insert mode, then save and quit, within unix file processing with awk and sed.
Delete data in vim by removing characters with x, delete the remaining part of a line with D, delete an entire line with dd, and remove multiple lines by counting.
Learn to append data to a file in unix using append mode in vi, using a and A to add at line ends and save or quit.
Master searching data in a file from the terminal using forward and backward searches with slash and question mark, and navigate to next and previous matches with n and N.
*Monthly Update*
Oct 2021 : Added/ Updated Grep and Egrep Videos
Apr 2021 : Updated AWK Videos
Jan 2021 : Added Questions & Exercises
AWK & SED
Many UNIX utilities generates rows and columns of information. AWK is an excellent tool for processing these rows and columns, and is easier to use AWK than most conventional programming languages. It can be considered to be a pseudo-C interpreter, as it understands the same arithmetic operators as C.
AWK also has string manipulation functions, so it can search for particular strings and modify the output. AWK also has associative arrays, which are incredible useful, and is a feature most computing languages lack. Associative arrays can make a complex problem a trivial exercises
AWK Coverage Basic to Advance AWK
Environment Setup with Test Data
Basic Operations : Fetch One or Multiple Columns Data
Basic Operations : Fetch One or Multiple Columns Data with Separator
Conditionally Fetch Data using Logical OR and Logical AND
Condition Handling with AWK Commands
AWK Looping
AWK Blocks
Save AWK Results to the file
SED Coverage
SED Introduction
Display one or Few lines in Output
Display Data by Search conditions
Skip Data to display in output
Find and Replace Data
Search | Insert | Update and Delete Data
Search Data using GREP commands
Search Data in one or Multiple Files
Search Data in All files
Search data with case or ignoring case
Search data with surrounding words
Advance Search Condition
Cut Commands
Cut Columns
Cut Range of Columns
Cut by characters