得到以下输出:
<iframe src="http://domain.xy/load.php?file=2260301" frameborder="0" scrolling="no"></iframe>|http://img1.domain.xy/t/301/320/5_2260301.jpg;http://img1.domain.xy/t/301/320/1_2260301.jpg;http://img1.domain.xy/t/301/320/2_2260301.jpg;http://img1.domain.xy/t/301/320/3_2260301.jpg;http://img1.domain.xy/t/301/320/4_2260301.jpg;http://img1.domain.xy/t/301/320/6_2260301.jpg;http://img1.domain.xy/t/301/320/7_2260301.jpg;http://img1.domain.xy/t/301/320/8_2260301.jpg;http://img1.domain.xy/t/301/320/9_2260301.jpg;http://img1.domain.xy/t/301/320/10_2260301.jpg|
<iframe src="http://domain.xy/load.php?file=2260279" frameborder="0" scrolling="no"></iframe>|http://img9.domain.xy/t/279/320/10_2260279.jpg;http://img9.domain.xy/t/279/320/1_2260279.jpg;http://img9.domain.xy/t/279/320/2_2260279.jpg;http://img9.domain.xy/t/279/320/3_2260279.jpg;http://img9.domain.xy/t/279/320/4_2260279.jpg;http://img9.domain.xy/t/279/320/5_2260279.jpg;http://img9.domain.xy/t/279/320/6_2260279.jpg;http://img9.domain.xy/t/279/320/7_2260279.jpg;http://img9.domain.xy/t/279/320/8_2260279.jpg;http://img9.domain.xy/t/279/320/9_2260279.jpg|
<iframe src="http://domain.xy/load.php?file=2259929" frameborder="0" scrolling="no"></iframe>|http://img9.domain.xy/t/929/320/1_2259929.jpg;http://img9.domain.xy/t/929/320/2_2259929.jpg;http://img9.domain.xy/t/929/320/3_2259929.jpg;http://img9.domain.xy/t/929/320/4_2259929.jpg;http://img9.domain.xy/t/929/320/5_2259929.jpg;http://img9.domain.xy/t/929/320/6_2259929.jpg;http://img9.domain.xy/t/929/320/7_2259929.jpg;http://img9.domain.xy/t/929/320/8_2259929.jpg;http://img9.domain.xy/t/929/320/9_2259929.jpg;http://img9.domain.xy/t/929/320/10_2259929.jpg|
并需要以下内容:
<iframe src="http://domain.xy/load.php?file=2260301" frameborder="0" scrolling="no"></iframe>|5_2260301.jpg;1_2260301.jpg;2_2260301.jpg;3_2260301.jpg;4_2260301.jpg;6_2260301.jpg;7_2260301.jpg;8_2260301.jpg;9_2260301.jpg;10_2260301.jpg|http://img1.domain.xy/t/301/320/|
<iframe src="http://domain.xy/load.php?file=2260279" frameborder="0" scrolling="no"></iframe>|10_2260279.jpg;1_2260279.jpg;2_2260279.jpg;3_2260279.jpg;4_2260279.jpg;5_2260279.jpg;6_2260279.jpg;7_2260279.jpg;8_2260279.jpg;9_2260279.jpg|http://img9.domain.xy/t/279/320/|
<iframe src="http://domain.xy/load.php?file=2259929" frameborder="0" scrolling="no"></iframe>|1_2259929.jpg;2_2259929.jpg;3_2259929.jpg;4_2259929.jpg;5_2259929.jpg;6_2259929.jpg;7_2259929.jpg;8_2259929.jpg;9_2259929.jpg;10_2259929.jpg|http://img9.domain.xy/t/929/320/
我使用此命令仅获取 jpg 文件名,
sed 's|http://img*......................||g'
这不优雅。我将寻找另一个解决方案。我需要知道如何保存目录 url 并将每个放在行尾http://img9.domain.xy/t/929/320/
谢谢帮助