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?


How do I read a text file using awk pattern scanning and text processing language under Linux / Unix like operating systems?

{ 1 comment }

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?


How do I find out that /users/f/foo/file.txt file belongs to a specific partition?


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?


How do I pass shell variables to awk command or script under UNIX like operating systems?


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

{ 1 comment }