ls $1 | xargs -I {} -t mv $1/{} $2/{}
here the I command says use {} to replace the piped output
thus we use
find . -iname '*nons*' -print0 |xargs --null -I {} cp {} ../nonstandard-analysis/{}
to deal with
1) spaces in output file names from find we use -print0 and
correspondingly to match we use xargs --null
2) to deal with the xargs applied command which has multiple arguments we use the -I {}
to fill in for the xargs output
cool!
Thursday, December 18, 2008
xargs with complicated command line
xargs will pipe to a command. what if it has complex structure?
Subscribe to:
Post Comments (Atom)
1 comment:
彌月禮盒團購美食 印刷 彩色印刷 包裝 設計pe膜 冬令營 food processing equipment frying machine Telecom PCB 泡菜 團購美食油飯麻糬
創業加盟 水餃 壯陽食品 早洩漆彈情趣用品 湯包 搬家公司 會場設計紙盒訂裝 展覽設計展場設計 展覽設計 消防設備 消防設備 機電 崴立機電 牙齒美白 植牙
Post a Comment