Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[?] Basic

Status
Not open for further replies.

shyg

Technical User
Jul 12, 2004
20
0
0
US
1. How do I create an empty line and pass it on to a file so there is a space as if I had hit return?
Code:
echo "text" >> test
echo "" >> test    #line which I want to be a space
echo "text" >> test

2. How can I create an empty or zero byte file? I have been trying to use cat for this but it stops my script waiting for me to enter text.
Code:
cat > ~/.test
 
1. what wrong with this?

2. > ~/test
OR
cp /dev/null ~/test

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
You may also try something like this:
echo "line1\n\nline3" > test

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top