Help with xargs

hi
Could any one please tell me the option using which we can run multiple commands using xargs

I have list of files, I want to run dos2unix and chmod at one shot on them

I tried google n searched man pages but couldnt really find the solution , please help

right now im doing this

ls *.today | xargs -i dos2unix {}
ls *.today | xards -i chmod 755 {}

Regards
Sunny

Try:

ls *\.today|xargs -i ksh -c 'dos2ux {};chmod 755 {}'
2 Likes

thanks mate , works pefeclly, but cudnt get ksh -c command, could u pls tell lil bit abt it

For each argument xargs receives , a new KSH shell is open to do the processing.

Regards.

Alternatively:

for i in *.today
do
  somecmd "$i"
done
chmod 755 *.today