Pass argument to shell script using $system in system verilog

Hi,
I want to call a shell script to which line number is an argument.

for(i=0; i< 10; i++)
begin
$system(“sh file_processing.sh i”);
end

In above example “i” is an argument to shell script which indicate line number to be read in shell script.

But it is not working. May be “i” is considered as string in $system.

Can we pass dynamic argument to script by using $system ?

$system($sformatf("sh file_processing.sh %0d",i));

In reply to dave_59:

Thanks Dave,
It works.