简体   繁体   English

在init.rc中回显

[英]echo in init.rc

hi I want to add these scripts to init.rc but I get the error that init.rc doesnt support echo. 嗨,我想将这些脚本添加到init.rc,但我得到init.rc不支持echo的错误。

echo device > /sys/devices/platform/usbc.0/mode

what is the right way to do such a thing in init.rc? 在init.rc中执行此操作的正确方法是什么?

You could probably use write for that. 您可能会为此使用write Something like: 就像是:

write /sys/devices/platform/usbc.0/mode ${device}

Or if you literally want to write the string "device": 或者如果你真的想写字符串“device”:

write /sys/devices/platform/usbc.0/mode "device"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM