hi help me please.
Input file:- ram.csv(it's comma sep)
Name NumStart NumEnd Price
sat 50 53 6RS
ram 74 77 11RS
jim 82 83 15RS
Output file:- out.txt
sat 50 6RS
sat 51 6RS
sat 52 6RS
sat 53 6RS
ram 74 11RS
ram 75 11RS
ram 76 11RS
ram 77 11RS
jim 82 15RS
jim 83 15RS
Help me in using batch script and using awk tool in windows (agerman kindly help me).
print sequential number
Moderator: DosItHelp
-
- Posts: 319
- Joined: 12 May 2006 01:13
Re: print sequential number
Code: Select all
C:\test>gawk -F"," "{ for(i=$2;i<=$3;i++) {print $1,i,$NF}}" OFS="," file
sat,50,6RS
sat,51,6RS
sat,52,6RS
sat,53,6RS
ram,74,11RS
ram,75,11RS
ram,76,11RS
ram,77,11RS
jim,82,15RS
jim,83,15RS
Re: print sequential number
Thanks Ghost its working fine.
And i want batch script too.
And i want batch script too.