Hi Ryan,

You are right! Thanks very much for your help!
Best Regards
Nan Xiao


On Sun, Aug 20, 2017 at 4:45 AM, Ryan Stone <[email protected]> wrote:
> If a script uses a positional argument like $1, the script will error
> out if you don't provide that parameter.  Try instead supplying a pid
> on the command line:
>
> # ./tracewrite.d 123
>
> On Fri, Aug 18, 2017 at 3:27 AM, Nan Xiao <[email protected]> wrote:
>> Hi all,
>>
>> Greetings from me!
>>
>> I am trying the following simple script on FreeBSD 11:
>>
>> #!/usr/sbin/dtrace -s
>>
>> syscall::write:entry
>> /pid == $1/
>> {
>> }
>>
>> and get following error:
>>
>> # ./tracewrite.d
>> dtrace: failed to compile script ./tracewrite.d: line 4: macro
>> argument $1 is not defined
>>
>> From this 
>> link(http://docs.oracle.com/cd/E19253-01/817-6223/chp-script-3/index.html),
>> it seems FreeBSD doesn't support macro argument, right? If I want to
>> use it, what is the correct method?
>>
>> Thanks very much in advance!
>>
>> Best Regards
>> Nan Xiao
>> _______________________________________________
>> [email protected] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
>> To unsubscribe, send any mail to "[email protected]"
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
To unsubscribe, send any mail to "[email protected]"

Reply via email to