---
title: "Discussion on \"Linux commands : awk, sed, grep, expect\" | Hashnode"
description: "Discussion on \"Linux commands : awk, sed, grep, expect\". awk:\nawk command treats the spaces as a delimiter for fields by default.\nawk 'command' <file-name>\nawk '{print}' awkcommand.txt\nawk '{print $1}' awkcommand.txt # it will show the first field\n\n\nhere we put $1 to get the first field of each line.\n\nreme..."
url: "https://hashnode.com/posts/linux-commands-awk-sed-grep-expect/65ca2e9aca234a2fec7aa6a2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Linux commands : awk, sed, grep, expect](https://abinashmishra.in/linux-commands-awk-sed-grep-expect?utm_source=hashnode&utm_medium=feed)

awk: awk command treats the spaces as a delimiter for fields by default. awk 'command' <file-name> awk '{print}' awkcommand.txt awk '{print $1}' awkcommand.txt # it will show the first field here we put $1 to get the first field of each line. reme...

Feb 12, 2024 · 2 min read · abinashmishra.in  
Updated Apr 13, 2024  
Read the article

-   [#linux-for-beginners](https://hashnode.com/tag/linux-for-beginners)
-   [#awk](https://hashnode.com/tag/awk)
-   [#linux-basics](https://hashnode.com/tag/linux-basics)
-   [#awk-commands](https://hashnode.com/tag/awk-commands)

## Written by

[Abinash Mishra](https://hashnode.com/@abinash005)

@abinash005 · Bangalore, Karnataka

  
[View profile](https://hashnode.com/@abinash005)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
