Click to See Complete Forum and Search --> : Unix test file


arg03
03-10-2008, 02:11 PM
I was making a file to create a letter stock
How to create bullets in unix file
example:

Lead subtitle:
* 1
* 2
* 3
* 4

Thanks

LeeU
03-10-2008, 04:53 PM
What is the editor you are using?

TJ111
03-10-2008, 06:04 PM
Just use the `printf` function (if this is in bash).

IDX=0;
FILE="/path/to/file.txt"
list_item()
{
TEXT=$1
printf "\t${IDX}: ${TEXT}\n" >> $FILE
IDX=$IDX+1
}
list_item "Item 1"
list_item "Item 2"

After you ran that the file would have:

1: Item 1
2: Item 2

arg03
03-11-2008, 01:09 PM
I was confused, I need to put bullet in post script file, How can I do it?

arg03
03-11-2008, 01:12 PM
I am using Korn shell and vi editor