1 reputation
bio website
location
age
visits member for 1 year, 4 months
seen yesterday

Mar
4
comment sed extract with multiple options in end pattern
I am in FreeBSD and the following works fine. sed -n -E "/Word1/,/Word2-1/p" | sed -n -E "/Word1/,/Word2-2/p" Thanks for the help.
Mar
4
comment sed extract with multiple options in end pattern
What if file has word2-1 before word2-2 and I want to extract (word2-1/wor2-2 whichever comes first).
Mar
4
comment sed extract with multiple options in end pattern
ok. I missed a point. Sorry for that. Output can have both the end patterns, but cmd should extract till the first occurrence (does not matter which second word comes first).
Mar
4
asked sed extract with multiple options in end pattern
Mar
2
comment Is there anyway to set a readonly environment variable?
yeah, that is a thing to worry about :(
Mar
2
comment Is there anyway to set a readonly environment variable?
I was thinking to write these variables data into a 'root' owned file from C code and then read.. But just setenv/getenv seems to make life easier. And the only worry is, data/env can be modified by others. :( Too bad that there is no way to restrict this. :(
Mar
2
comment Is there anyway to set a readonly environment variable?
yes, in C. @jordanm
Mar
2
comment Is there anyway to set a readonly environment variable?
No, I am doing it in openssh code.
Mar
2
asked Is there anyway to set a readonly environment variable?