Technical professionals. Trusted advisors. Certified expertise.

HCS Blog

Problem-solving by Apple Certified Professionals

Using the EOF (End of File) Command

There are time when you need to escape special characters in a bash script like dollar signs or backticks.  If you ever need to quote an entire section of text in a bash script without having to escape all special characters, use the cat command with EOF in single quotes.

When EOF is enclosed in single quotes, it ignores any special characters and will not interpret them in your script.  

The following command will print out the lines in between ‘EOF’ and EOF to the screen.


cat << 'EOF'

Lines with $signs are OK

Line with `backticks`

EOF


This is a handy command for your arsenal.  Enjoy.
×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Mac with USB 3.0 Device Limits
How to start and stop the PresSTORE P5 backup serv...

Locations


New York

Connecticut
Florida
Louisiana
Chicago

Corporate Headquarters
New York

80 Orville Drive Suite 100
Bohemia, NY 11716
Tel: (866) 518-9672
This email address is being protected from spambots. You need JavaScript enabled to view it.

Connecticut

65 High Ridge Road #510
Stamford, CT 06905
Tel: (866) 518-9672
This email address is being protected from spambots. You need JavaScript enabled to view it.

Florida

3321 SW 194th Terrace
Miramar, FL 33029
Tel: (866) 518-9672
This email address is being protected from spambots. You need JavaScript enabled to view it.

Louisiana

218 Barksdale Drive
Broussard LA 70518
This email address is being protected from spambots. You need JavaScript enabled to view it.

Chicago

4 Knollwood Place
Joliet, IL 60433
This email address is being protected from spambots. You need JavaScript enabled to view it.

London

10 Grosvenor Court
Rayners Road
London SW15 2AX UK

Stay Connected

© Copyright 2023, HCS Technology Group. All Rights Reserved.