[Gambas-user] Compiling Gambas 1.9.26
Christopher Brian Jack
brian at ...1334...
Mon Mar 20 09:28:51 CET 2006
On Mon, 20 Mar 2006, ron wrote:
> On Monday 20 March 2006 08:01, Christopher Brian Jack wrote:
> > for each in `grep -l -r -i "[-]fvisibility"`; do echo ${i}; cat "${i}" |
> > sed -e "s/-fvisibility//g" >.fvisibility; mv "$i" "${i}_bak"; mv
> > .fvisibility "$i"; done
> >
>
> Thanks, that is just what I wanted, look for every command
> in the man pages and the try and error cost me more time
> as using mc -> find files and them the F4 (edit).
> Now I can do it with a script when needed.
I use grep, sed and shell scripts quite frequently so the hardest part for
me was up the switches to grep so it returns only the list of files.
And yes i was supposed to be the loop variable in the for rather than
each. The correct script is thus:
for i in `grep -l -r -i "[-]fvisibility"`; do
echo ${i}; cat "${i}" | sed -e "s/-fvisibility//g" >.fvisibility
mv "${i}" "${i}_bak"
mv .fvisibility "${i}"
done
.=================================================.
| Christopher BRIAN Jack aka "Gau of the Veldt" |
+================================================='
| brian _AT_ brians-anime _DOT_ com
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
More information about the User
mailing list