You are not logged in.
I try to clean up some source code and convert all tabs with spaces (C++).
But I don't want to do this manually for sure.
So I tried to use the expand command like this:
$> for i in $(find -type f -iname "*.cpp"); do expand -t4 $i > $i; done
This seems to work at the first look, but checking with
git status
and looking into the actual files, they are all empty now. Any idea how to recursively convert tabs to spaces?
digiKam developer - www.digikam.org
Offline
Maybe....
sed -i "s#\t# #g" *.cpp
Offline
expand -t4 $i > $i.back; mv $i.back $i;
Offline
expand -t4 $i > $i.back; mv $i.back $i;
Oh man this was too easy :-D It worked, thank you...
digiKam developer - www.digikam.org
Offline