Hi
Is there a way to create a list of entries in a file without using vi to create this list ? I like to write a shell script that would create a list like this:
apple : 2
orange : 4
pear : 3
Any tips/suggestions ?
Thanks
Hi
Is there a way to create a list of entries in a file without using vi to create this list ? I like to write a shell script that would create a list like this:
apple : 2
orange : 4
pear : 3
Any tips/suggestions ?
Thanks
Try out this:
echo "hello" > file.txt
Also check what this does:
echo "world" >> file.txt
That has your answer (among many other solutions).
HTH
You can use loops in the script to create the list.
Regards,
Chella
Here's another way (BASH/KSH/SH)
cat <<LIST >list.dat
apple : 2
orange : 4
pear : 3
LIST
cat list.dat