| |
| |
| |
|
Page: 1 2 3
Comments:
<0> both failed <0> in the script and in the shell <1> ah, now that's interesting <1> do you have a /bin/sed and a /usr/bin/sed ? <0> yes <1> call both with a --version <0> but i tried the other one too <1> then compare "echo $PATH" inside and outside the script <0> GNU sed Version 4.1.4 <0> i've done a which sed in my bash script and in my shell <0> with the same result: /usr/bin/sed
<0> The versions are the same too <1> hm, so much for that theory then <1> kay, anyway, try an explicit /usr/bin/sed -i -f mygl.sed $* inside and outside the script <1> and see if /bin/sed ... does the same <0> Maybe sed is using a different config file, depending on if started from shell or script <1> sed doesn't have config files <0> all tests failed <1> all? <1> that is, 4 tests failed? <0> yes <1> whee <0> it's really strange <1> so so far, the only thing that works is a "sed -i -f mygl.sed whatever.cc" from the command line? <1> in that case, see what a "type sed" prints on the same command line <0> I did all 4 test without the -i parameter <0> but yes if i do "sed -f mygl.sed my.cpp" the result is good. <1> so you put a "/usr/bin/sed -f mygl.sed $*" inside the script it won't work, if you put "/bin/sed -f mygl.sed $*" it doesn't either, ... <0> sed is aliased to `env LC_ALL=C sed' <1> that helps <0> I think that was the solution <1> *nod* <0> The result of type sed <0> Ok, thank you very much, you successfully solved my problem. <0> So the right line in my bash script is "env LC_ALL=C sed -f mygl.sed $*" <0> Now i can remember setting this alias a long long time ago, when i had this similiar problem in the shell. <1> :) <1> generally a good idea to turn off utf-8 when doing something with regex and pals <0> Damned thing, why do people forget things ;-) <1> I guess sed / posix regex library could be compiled for utf-8 support, but your distro might not be shipping one <0> I'm using gentoo. <0> I'm compiling everything <1> *nod* <1> not sure if the ebuild respects the utf-8 flag properly for the relevant packages then <1> you may even need custom patched versions of some utils to have them utf-8 compatible <0> ok <0> What linux do you use? <1> sourcemage <2> :) <0> I hear this the first time <1> also source-based, probably slightly different target userbase than gentoo <1> and much smaller :) <0> What do you think are the right users for sourcemage? <1> sysadmins / interested, somewhat experienced users
<1> with the difference that the first thing you learn in gentoo is how to set up a colored shell prompt, while in sourcemage it's writing the xorg.conf semi-manually ;) <1> if I may toss in an old stereotype ;) <1> gentoo uses a conf file and bunches of docs to configure portage, sourcemage uses a dialog-based menu system... not sure what that means about the difference between the distros, though 8) <0> ok <1> I'm biased, one of my personal differences is that the "kiddie factor" seems to be higher with gentoo, though that may just be due to the larger userbase and more linux-generic documentation from the distribution <0> Is there something like use flags in sourcemage? <1> a bit differently, yes <0> Is it possible to install different versions of a library with the packet manager? <1> the package-manager settings are part of the dialog interface, in the "feature menu" <1> nope, that's one of the things gentoo can do with more people, we usually just support "latest version we consider stable" <0> ah ok <1> the package-specific configuration is done via interactive prompting before the download/compile/install stuff <1> with answers from previous installs reused, and quite sane defaults <0> If im right it's a little bit like debian, i think there it could happen, too, that you get asked for some configuration when you are installing some thing. <1> *nod* <0> Do you have an backup strategy? <1> installed binaries are md5sum'ed into logs and put into a .tar.bz2 for recovery <0> For your personal data? <1> there's a tool to check if all files a package installed are still installed, have the right md5 (except for files known to change, e.g. conf files), have all dynamic link dependencies satisfied <1> and reinstall the package if not <1> what "personal data" ? <1> any package that installs into /root or /home should be shot <1> your home-modified configs in /etc aren't backed up <1> though the binary cache .tar.bz2 is only on your local machine anyway <0> Maybe a source code you wrote or a picture you have made. <1> ah <1> well, backing up stuff would be the responsibility of some backup package, or the user, should the distribution itself do backups of your data? <1> I'd rather choose between 3 different packages by some people that work on any distro, than use whatever someone on my distro wrote ;) <0> No but Im interested which package you use. <1> actually, myself I just use tar -cjf, mkisofs, and cdrecord 8) <1> sometimes without the mkisofs, though I'm not sure if those are actually readable later 8) <0> I'm dreaming of a program which uses something like inotify to do a backup on the fly in something like a repository from subversion on a second hard disk. :-) <1> then it would also automatically backup any change you want to revert ;) <1> and you'd have a hard time removing confidential stuff again <0> maybe this should be a difference to subversion, that you can really delete versions. <1> hmm <1> I think there actually are versioned filesystems <1> performance probably ****s though <1> you can probably get some ways with cron, find, and a log of the mtimes <0> I think inotify would do a better job, because it briefs you if a file get changed or written. <1> performance might sucj <0> This would be an interesting point. <0> But it's horrable to if my cron job for updatdb is starting. Because it takes very long till my hard disks are quite again. <0> +o <1> :) <0> Ok, i whish you a good night. <1> same to you <0> bye <3> BearPerson: Looks like a week for locale problems started yesterday. :) <1> :)
Return to
#sed or Go to some related
logs:
WG311T fc5 ubuntu x300 se dovecot local7 #kde #perl traffic shaping requires mangle #linux gentoo xorg-server INPUT usb mouse ubuntu nxfree client suse linux 10.1 turn numlock off
|
|