[email protected]:/tmp/test# touch /tmp/test/{2,3}
[email protected]:/tmp/test# ls
2 3
[email protected]:/tmp/test# rm /tmp/test/{2,3}
[email protected]:/tmp/test# ls
[email protected]:/tmp/test# t={2,3}
[email protected]:/tmp/test# touch /tmp/test/$t
[email protected]:/tmp/test# ls
{2,3}
解决办法:
[email protected]ubuntu:/tmp/test# eval touch /tmp/test/$t
[email protected]:/tmp/test# ls
2 3
时间: 2024-08-01 22:45:03