Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议改一下这边的脚本内容 #6

Open
a850874651 opened this issue Mar 6, 2022 · 0 comments
Open

建议改一下这边的脚本内容 #6

a850874651 opened this issue Mar 6, 2022 · 0 comments

Comments

@a850874651
Copy link

device=/dev/mapper/sudo kpartx -va $loopdevice | sed -E 's/.(loop[0-9])p./\1/g' | head -1 这一句话可能导致如果你的loop超过10以后将很报错 你的正则表达式只操作了loop0-loop9 超过将会报错,所以最好改为s/.(loop[0-9]+)p./\1/g 最后是这样 `device=/dev/mapper/`sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9]+)p.*/\1/g' | head -1

@a850874651 a850874651 reopened this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant