Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am writing my first udev rule. I read many how tos but can't find a way to assign ATTRS{variable} to ENV{variable}

in order to have access to that variable from RUN

like RUN+="/bin/mkdir/%E{variable}"

because with RUN+="/bin/mkdir/ATTRS{variable}" it doesn't work.

I tried to use $ATTRS{variable}, %ATTRS{variable}, ATTR{serial}, $ATTR{serial}, %ATTR{serial} with no success.

The variable itself exists 100%

thank you...

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I would delete this question but, probably, this could save one's time

So I used: ENV{variable}="$attr{variable}"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.