Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- counter=0
- for EveryLine in `cat input.txt`
- do
- let counter=counter+1
- let now=counter%10
- if [ $now -eq 0 ]; then
- count=10
- echo $EveryLine | sed -r "s/^([^,]*),(.*)$/\1,$count,\2/"
- fi
- if [ $now -ne 0 ]; then
- count=$now
- echo $EveryLine | sed -r "s/^([^,]*),(.*)$/\1,$count,\2/"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement