Unix SED command replacement and for loop in Powershell
hi,
platform: win server 08
requirement is
inputfile:
file1 contents:
row1: col1_value, col2_value, col3_value
row2: col1_value, col2_value, col3_value
row3: col1_value, col2_value, col3_value
row4: col1_value, col2_value, col3_value
outputfile: loop no of rows in file1 (4)
(
param1=<col1_value in row1..4>
param2=<col2_value in row1..4>
param3=<col3_value in row1..4>
)
script execute exe file 4 times once row in input file.
please let me how can achieve this. know how can in unix. using sed functionality. dont know how achieve in windows. please help.
regards
suresh
hi,
for example assumed csv file looks this
col1,col2,col3
val1,val1,val1
val2,val2,val2
...
for $parm can parse sting adding col
e.g.
$parm1 = $d.col1 + "," +$d.col2+","+$d.col3
Windows Server > Windows PowerShell
Comments
Post a Comment