Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 338209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:24:29+00:00 2026-05-12T10:24:29+00:00

When cat > xx.txt << EOF is entered on the command line, further input

  • 0

When “cat > xx.txt << EOF” is entered on the command line, further input from cmdline goes to file xx.txt until EOF is written. EOF is not a sacred word here, if instead the command was cat > xx.txt << BBB, then cmdline input goes to xx.txt until BBB is written. I don’t know whats the rationale behind ( << end_of_input_sequence)this. Cat man page does not explain much.
I have only seen this in scripts etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:24:29+00:00Added an answer on May 12, 2026 at 10:24 am

    It’s a feature of the shell, not cat – that’s why you won’t find it in the cat manual.

    It’s known as a “Here document” – see this page of the Advanced Bash-Scripting Guide for some documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have this file: cat > test.txt <<EOF line one word line two
file.txt contains: ##w## ##wew## using mac 10.6, bash shell, the command: cat file.txt |
The following statement will remove line numbers in a txt file: cat withLineNumbers.txt |
This is my input file .. [root@localhost scripts]# cat ip6hdr.txt | xargs -n4 6000
$ cat file.txt one two three $ cat file.txt | sed s/one/1/ 1 two
I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg
Stupid question, this code: <?php $variable = system(cat /home/maxor/test.txt); echo $variable; ?> with file
Hi I have the following file: $ cat file.txt col1 col2 col3 zz2 mm
i tried to run this script : for line in $(cat song.txt) do echo
I have this test file. [root@localhost ~]# cat f.txt a aa MM bbb b

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.