« first day (1712 days earlier)      last day (3250 days later) » 

 
2 hours later…
4:53 AM
@mikeserv It just reads from a file.txt without uncompressing it, and writes to file0.txt, file1.txt etc. Since it uses stat() on file.txt it needs the file to be uncompressed on disk, it can't read from a pipe.
 
 
4 hours later…
9:19 AM
Though my post was wrong earlier, I made corrections and tried to improve. (@TobySpeight, @Anthon and @terdon helped by commenting and probably voting down). But I can't understand why it is not undownvoted or upvoted still? Is revisions (still) causing for bad impression to visitors?
 
9:33 AM
Hey Guys, I'm really stuck with this one: serverfault.com/questions/698984/…
 
@WillemD'haeseleer Why are you explicitly sourcing profile?
 
9:59 AM
@Pandya I was not one of the downvoters, and there is no guarantee that they come back and review your changes. That is the risk of posting something that is less optimal from the start (or within a minute or two). Learn from it, move and move on.
 
@Pandya It's still wrong. You don't understand what find * means. It passes the list of files/dirs in the current directory and only those as target names to search for. It only prints files/dirs with the same name as those in the current dir.
You say:
> So, find * finds everything (recursively) for pwd
It doesn't. Read my answer. It will find all files with the same name as the ones in pwd (excluding the ones in pwd's subdirectories).
 
@terdon Because I need an alias in that file
 
10:23 AM
@terdon thanks a lot for correcting + teaching me. I've made correction to that.
 
@Pandya Much better, you're welcome and -1 removed :)
 
10:34 AM
What does <(ls) do in bash ? Here is an example: stackoverflow.com/questions/30560256/…
 
11:12 AM
@WillemD'haeseleer It passes the output of ls as input to another command.
 
@StéphaneChazelas - How can a conforming locale ever sort the digits 9876543210?
@cuonglm just linked me at this thing again:
But it is not doing what it's meant to do. In a locale where the 987654321 characters are in that order.
But I knew remembered this from before:
In a locale definition file, only the digits <zero>, <one>, <two>, <three>, <four>, <five>, <six>, <seven>, <eight>, and <nine> shall be specified, and in contiguous ascending sequence by numerical value. The digits <zero> to <nine> of the portable character set are automatically included in this class.
Is there a loophole or something?
 
11:30 AM
lol @Anthon:
I'm voting to close this question as off-topic because this has no other connection to U&L than the example. ( We don't want questions like: "What is the colour of a dollar bill, the ones that have a $ like the Unix user prompt" either) — Anthon 6 mins ago
 
@terdon Thx !
 
@StéphaneChazelas @fedorqui I don't see why this shouldn't be closed. What is so different about less?
The same solutions apply as far as I can tell.
 
@terdon, "-" is a different case from "-something". It's not only about less, it's about most text utilities and there's a similar case for "cd" and "pushd". See the comments to both answers.
And "-" alone is never considered as an option.
 
@StéphaneChazelas OK, as an argument then. But the same answers apply. A dupe doesn't delete the original. It is still there. On the other hand, less ./- or less -- - or less /path/to/- or find -name '-' -exec less {} \; all work. Why do we need more answers explaining that?
 
@mikeserv system locales on POSIX systems are required to have digits in that order. But that doesn't prevent one from creating a custom locale with the order reversed.
@terdon. No, less -- - (the second answer) doesn't work as - is not an option, -- is just redundant and doesn't help at all.
 
11:46 AM
@StéphaneChazelas - well ok, but wouldn't such a thing put that locale outside the spec's purview anyhow?
 
@StéphaneChazelas Ah! Indeed it doesn't. Should have realized that, the - is an argument so it won't be protected by --. OK, that is a very valid point.
 
@mikeserv, yes, not much outside of the C/POSIX locale is specified anyway.
 
Yeah - they're pretty careful about that:
Don't screw with [A-z\0/], else, anything goes.
Every one of their pages which discusses date formats is... more than a little difficult.
 
@terdon I would expect that the close reason comments would get deleted on a site-to-site move. Or is this because you moved is a mod and it was not really closed?
 
@Anthon No, the comments remain. They need to clean them up on the target site. Which reminds me, I should flag as obsolete.
Shame really, that was a brilliant close reason :)
 
11:58 AM
@Terdon I already deleted the comment as owner.
 
@Anthon Fair enough. I'll remember the $ billl line though, could come in handy for blatantly OT posts.
 
@terdon I added it to my profile text, makes it easy to find. Or maybe we should make a meta post with as answers reusable off-topic comments
 
Heh, that could get messy :)
 
 
1 hour later…
1:27 PM
Greetings, folks.
 
1:53 PM
@StéphaneChazelas in your deleted answer, why did you use $1 FS $2~/foo|bar/ and not just $1$2=~/foo|bar/?
What's the point of the FS?
 
 
5 hours later…
6:27 PM
@terdon nice structural Q&A writeup
 
@Anthon Thanks. I hope we can close the 10k simple field-based questions as dupes.
This one for example:
1
Q: Delete lines that contain X in specific column .csv

Teddy291I currently use the following to delete all emails that contain EXAMPLE sed -i '/EXAMPLE/d' newname.csv However that deletes lines that have EXAMPLE in any of the columns. I want it to only delete lines that contain EXAMPLE in the second column. Columns are separated with tabs. (example below)...

@Anthon assuming you agree that it is indeed a duplicate (please tell me if you don't), could you vote to close the above as a dupe of my canonical one? I don't want to be accused of power abuse again.
 
@terdon - then why do it?
 
@mikeserv What do you mean? I'm specifically not doing it.
Nice answer there by the way, despite the OP's being a bit difficult.
 
Ok, then why not do it - which is what I meant to say - when the question was first asked?
I dunno. I'm down with OPP.
 
@mikeserv Oh sure, I mean that he seems confused. Not obstinate. No problem with him at all. It just took a few revisions for you to figure out what he needed.
 
6:33 PM
Well, I just jumped on a pun. I don't care about that guy.
 
@mikeserv I still don't understand. I saw that question and started writing an answer then decided we really need a broad one to close all these "how do I print lines if the Nth field is foo" and decided to write one.
I couldn't close it when it was asked 'cause I hadn't written mine up yet.
 
Written your what?
 
lol
We're at cross purposes here. Written my Q&A which is an attempt to formulate a general problem and solution about doing simple things to field delimited data
 
Dang, man - why not just edit the original post?
 
Because I wanted to make it way broader.
 
6:36 PM
I don't know those contrived canonicals - I never like reading em. They always sprawl - like a lot - and they seem to accomplish very little.
Anyway, I canonical q should be closed as dup of your other one.
How to edit a file or something?
How to replace a string in a file - right?
That's broader.
 
@mikeserv Yes, but doesn't deal with fields.
 
Sure it does. Fields are strings, too man.
I even edited in an example of how to do that just yesterday.
 
I don't like canonicals to be too broad. For example, I really didn't like your latest edit to my operators Q&A. Everything you write is true and useful, I just didn't want to make it that long and scary. I wanted a quick reference that people can easily skim through, not a comprehensive documentation. Still, I made it community wiki so I can't do anything about it.
Oh, sorry, I meant your edit to the strings question.
I just wanted a simple little thing with some quick tools for Linux boxes. Not a POSIX-safe ultra portable analysis L:)
Which is why I didn't make this one CW. I don't really want it to grow much more than it has. Anything else should be in a separate answer IMO.
 
@terdon In your Q I would change "print" to "manipulate", and expand "of a similar vein" to a list of actual actions (print, suppress, delete, change). I would also put the extra actions in the title.
 
I didn't do any analyses - I just posted a link at the top. People can read it or not - but it's not nice to know how a thing might screw up their property if misused and not mention it when you recommend it to them. In my opinion.
 
6:41 PM
@Anthon That's what I was just saying. I tried that with the replacing strings question and it just got out of hand. It is huge now. I'd rather keep this one simple. I thought of also adding things for manipulating (+-%/ etc) the fields but I fear that will just make it too complex.
I am aiming this at newbies who just want to do something simple.
 
Hadn't been reading here, sorry
 
@mikeserv Very! As I said, everything you added is both true and useful. I'd love to read it if it were I asking. It's just that it is harder to close as a dupe now when we have some clueless newbie who just wants to replace foo with bar. They don't want nor need to read quite that level of detail.
Still, it's a great resource to have, it's just now almost more useful for experts than newbies.
Great for the site, just not what I had planned.
 
The very top of that q is s/foo/bar/
 
A while back I retagged a few posts from to to distinguish them from the complex CVS ones that cannot be done with line orientation. Those are probably all candidates for closing.
 
Don't get me wrong @mikeserv, this is not a complaint. This is precisely what CW is for. The community can collaborate on them.
@Anthon Precisely.
 
6:44 PM
Don't sprawl it further then, please. Just close those you want to close - but don'
t make another one of those - there's no proof any of it works.
 
Huh?
proof of what?
 
It's just a bunch of : try this.
Of it working.
I think I just figured it out - why I don't like those things. They're engineered.
 
?
 
The Q/A stuff is cool because show w/ a real problem and say - can you fix this?
The people that read those see results for effort.
Those canonicals are not the same.
Anybody could go in there and say whatever they want - I just did yesterday, so I know.
But there are no results.
There's no effort. And there's no problem.
 
Sorry you feel that way. Don't waste your time writing any then.
 
6:50 PM
I generally don't. But I do like to help. Sorry if that offends.
 
@mikeserv Huh? Of course it doesn't! I don't particularly like being told that what I spent the last half hour writing represents no effort and is useless but that's how you feel so I can hardly complain about it. Not offended though, I know you like to go into great detail and that's great. I don't always and that should be OK as well.
 
Now that's fair.
That wasn't at all what I meant,
Of course there is effort in its initial production.
But when they get to be like wiki's - when they cease to be about a specific problem - or whatever - they get really bad.
 
Which is precisely why I'm keeping this one simple.
Also why I'd originally written my other two "canonical" ones as summaries of the subject. They have both since morphed into something far more comprehensive but that was not my doing.
 
But it's not simple - it's already 4 pages long and it's all engineered. Problems engineered to suit a solution.
And half of the stuff in there is already in the other one.
I don't know how you can get more comprehensive than how to replace a string in a file.
I mean, not considering the subject matter, anyway.
 
@mikeserv Look at the first version. It was far more concise. I wanted to give simple problems and simple solutions so we can close simple questions against them.
It was not I who turned it into a sprawling wiki. In fact, it was mostly you :)
 
6:59 PM
Man, I'm not arguing that it wasn't. But it was an umbrella post - that was its point. Your head's already dry man. Just stick the parts that aren't already there in the other and close those you want to close for it. But don't make more of those - they're dangerous after a while. Let's just keep all of that stuff where we can keep an eye on it, please?
 
Oh crap, no it was me actually.
 
Me? I thought so. I put in 2 paragraphs, I think.
And I removed some too - so maybe it was three.
 
@mikeserv I much prefer having the distributed and each dealing with simple/precise issues.
@mikeserv Yeah, it was stephane who kept pointing out corner cases and I folded. I'd have left it as it was today.
 
OK, that is entirely contrary to point of the broad post in the first place.
 
I like the idea of having canonical answers to the simple general questions. No need to cover all edge cases, they deserve their own Q&As
 
7:01 PM
You've already got 400 very concise questions.
 
Anyway, I'm sorry but I have to go to dinner. Feel free to vote to close, as you have, and let the community decide but I don't agree with your take on these. I won't use the mod hammer since I don't want to impose my take but I won't promise not to write more either. I think they're a good thing.
 
It's just that bad advice gets in those things. That other one had -i all over it - and not a peep about how it might flood filesystems, break user-quotas, enable a user to overwrite another user's file accidentally or on purpose.
Enjoy your dinner.
 
 
3 hours later…
9:47 PM
Great, write your own Q&A explaining those dangers and we can link to it. There's no reason and little point in including everything in the same place.
 

« first day (1712 days earlier)      last day (3250 days later) »