≡ Menu

awk command

I'm writing a shell script for automation purpose. The output the path of the current working directory is stored in $PWD or it can be obtained using the pwd command. How do I find out find out 3rd field separated by the forward slash (/) delimiter using $PWD under Unix like operating systems?
[click to continue…]

Linux / Unix AWK: Read a Text File

How do I read a text file using awk pattern scanning and text processing language under Linux / Unix like operating systems?
[click to continue…]

Linux Command: List All Users In The System

I'm a new Linux sys admin and I'm unable to find the command to list all users on my RHEL server. What is the command to list users under Linux operating systems?
[click to continue…]

Linux: Find Out What Partition a File Belongs To

How do I find out that /users/f/foo/file.txt file belongs to a specific partition? How do I find out on what partition a file exits?
[click to continue…]

I'd like to skip first two or three fields at the the beginning of a line and print the rest of line. Consider the following input:

This is a test
Giving back more than we take

I want my input file with the following output:

a test
more than we take

How do I printing lines from the nth field using awk under UNIX or Linux operating systems?
[click to continue…]

Bash: Pass Shell Variables To awk

How do I pass shell variables to awk command or script under UNIX like operating systems?
[click to continue…]

How can I convert newline [ line break or end-of-line (EOL) character ] between Unix and Windows text files?
[click to continue…]