Hello
I am trying to automate some job using xargs, and i get strange result:
I have a file ~ed/temp/templist.txt containing single line (it will contain many, but for examle its only one):
I execute the following command (in the right directory - where ./images/baners exists)
[CMD=]cat ~ed/temp/templist.txt | xargs -L 1 -t ls[/CMD]
I get this output:
When I manualy execute [cmd=]ls ./images/baners/*[/cmd]
Then I get the expected result
If I remove * from the templist.txt file everything works ok. But I need this * symbol. I use ls here only as example.
What I am doing wrong, why I dont get the correct result when I use xargs?
10x in advance
I am trying to automate some job using xargs, and i get strange result:
I have a file ~ed/temp/templist.txt containing single line (it will contain many, but for examle its only one):
Code:
./images/baners/*
I execute the following command (in the right directory - where ./images/baners exists)
[CMD=]cat ~ed/temp/templist.txt | xargs -L 1 -t ls[/CMD]
I get this output:
Code:
ls ./images/baners/*
[red]ls: ./images/baners/*: No such file or directory[/red]
When I manualy execute [cmd=]ls ./images/baners/*[/cmd]
Then I get the expected result
Code:
-rw-rw-r-- 1 pulsar www 41988 Nov 9 11:45 ./images/baners/227.jpg
-rw-rw-r-- 1 pulsar www 42842 Nov 19 10:55 ./images/baners/229.jpg
-rw-rw-r-- 1 pulsar www 39850 Nov 19 10:55 ./images/baners/230.jpg
...
If I remove * from the templist.txt file everything works ok. But I need this * symbol. I use ls here only as example.
What I am doing wrong, why I dont get the correct result when I use xargs?
10x in advance