The TLDR Tech
  • Home
  • Django
  • About
  • Author
  • Consult
Sign in Subscribe

Shell Scripting

A collection of 1 post
How to create a file using shell script (heredoc)?
Unix

How to create a file using shell script (heredoc)?

The TLDR answer: If you need to use a shell script which would create a file with the dynamic content using few variables then you can use the code below. The approach we shall take here will use heredoc / here document syntax. cat << EOF > demo.txt cd
11 Feb 2021 1 min read
Page 1 of 1
The TLDR Tech © 2025
Powered by Ghost