How do I redirect a tab to a file? - TechRepublic
General discussion
March 1, 2001 at 03:20 PM
iamsanchez

How do I redirect a tab to a file?

by iamsanchez . Updated 25 years, 3 months ago

I’m trying to build a very simple script which take input from the user to build an address book. The response is then redirected to a simple file where the info will be stored in column format, separated by , of course using the \t escape character, rith?

Except that I’ve tried everything and I have not been successful at getting the tab to separate my entries.

I tried to figure it out myself, but I’ve spent hours trying and nothing.

Any ideas out there?

Thank you
Rafael.
Here’s my script…
————-
#!/bin/sh

entry=y

while [ $entry = y ]
do
echo -n “Enter Name :”;
read name
echo -n “Enter Street :”;
read street
echo -n “Enter City :”;
read city echo -n “Enter Province :”;
read province
echo -n “Continue? (y)Yes (n)No “;
read entry

echo $name$street$cityt$province } >> adrbook
done

This discussion is locked

All Comments