Using sed
how can I replace the lines that start with a star and replace it with numbers starting from 1?
I need to replace the (*) in the fist of a list with numbers using sed for example >
this file contain a list
*linux
*computers
*labs
*questions
to >>>>
this file contain a list
1 linux
2 computers
3 labs
4 questions
I tried using
sed -e 's/*//' file.in > file.out | sed -i = file.out
awk
rather thansed
. Additionally, is this a homework question? What have you tried?