« first day (3226 days earlier)      last day (1729 days later) » 

6:14 AM
@MichaelHomer Ugh. Still a bizarre approach to security.
I've never heard of such a thing before. Wrong is wrong.
 
I mean, it's pretty evidently not, but ok
Much, much better to encourage people to use good passwords by ensuring they don't get locked out by insignificant errors and learn to use 12345 instead
 
It kind of reminds me of this cartoon:
@MichaelHomer Pretty evidently not what?
 
 
2 hours later…
7:58 AM
Specification lawyers, your input is invited:
0
Q: What does POSIX sed require for `1d;1,2d` where an address range starts from an already-deleted line?

Michael HomerIn the comments to this question a case came up where various sed implementations disagreed on a fairly simple program, and we (or at least I) weren't able to determine what the specification actually requires for it. The issue is the behaviour of a range beginning at a deleted line: 1d;1,2d ...

 
 
2 hours later…
10:01 AM
Odd, I'd expect there to be a better/simpler solution to this:
6
Q: Yank a column of text copied from the clipboard

hbogertI often seem to want to copy paste multiple columns, for example, I paste one column line one line two line three Now I'd like to be able to yank another column behind it. Assuming my kill buffer has the following: added to one added to two added to three Which command would I need to invok...

 
10:16 AM
@FaheemMitha The operation may seem simple, but the implementation of it is not.
 
@Kusalananda I suppose so. I would have thought Emacs would have something like this built in, but apparently not.
 
 
1 hour later…
11:36 AM
Interesting question....
0
Q: How to run aws cli commands as a specific user?

overexchangeCurrently we are running 4 commands: below aws cli commands in jenkins docker container: sh 'aws cloudformation package ...' s3Upload() Below aws cli commands in docker container: aws s3 cp source dest aws cloudformation deploy To run these above 4 commands in dock...

 
11:46 AM
@MyWrathAcademia yes, they clarified that. They want to insert and shift to the right when they don't match. It was a fun problem, actually, so I ended up posting an answer.
@overexchange Why are you posting that on SO? It shouldn't be on topic there, I don't think, it isn't about programming.
 
12:04 PM
Ok
 
Is discussion regarding burning iso image on usb stick in linux mint allowed here? [ Assuming a single person cannot discuss with ownself]
 
12:20 PM
@AjayMishra It's allowed, yes. But it would be better to post a question on the site where more people can see it and answer you.
 
12:53 PM
@terdon I've been trying that thing from 2 hours, i couldn't figure out, so I leave the idea.
Do you know how to bypass some proxy in linux?
Like I want to use my university proxy except some sites, how to tell me computer those sites?
I can do that in windows quite freely but I've no idea about linux.
I'm using linux mint.
 
1:07 PM
@AjayMishra I suggest asking a question about that; but in your proxy configuration, there should be an entry for hosts to ignore
For your ISO image question, cat image.iso > /dev/sdX should work
 
1:22 PM
awk 'BEGIN{print "Good Morning Chat!" > "/dev/chat"}'
 
1:58 PM
@Kusalananda: I have seen API guides that instruct you to use the \ escape character for any & in a curl url. It really bothers me they don't just say to quote all URLs
Damn sorry I edited that so many times
 
2:17 PM
@Jesse_b If using an URL from within some other type of code, it may not be possible to quote the whole string. It kinda depends on what it is that will (or may) interpret the string. In the shell, though, quoting the URL is by far the simpler solution.
 
@Kusalananda These are guides that are used from a bash and/or ksh on the cli
 
Then, yes, just quoting it would be simpler than having to somehow preprocess it (quoting individual characters).
 
@Kusalananda: Are you still on vacation?
 
3:16 PM
@Jesse_b Sorry for the delay in answering. I was sitting on a lawn in a park eating an ice cream.
 
@Kusalananda Sounds like a pretty good time
I'm still struggling to make my lawn look as good as Jeff's
 
Working from Monday.
 
@Kusalananda Probably got bored after a long vacation like that?
 
@Jesse_b Nah, not really...
Oh, and I saw a cat engaged in useless use of mouse.
 
Hah, my cat often attacks my mouse
0
Q: How to read readline key bindings

Felix Dombekbind -P gives me back things like bracketed-paste-begin can be found on "\e[200~". revert-line can be found on "\e\C-r", "\er". previous-history can be found on "\C-p", "\eOA", "\e[A". How do I read this stuff? Is there a complete description somewhere?

This seems like a request for learning material but IMO it's a good question
 
3:44 PM
@Jesse_b This mouse would have been even more useless if it had been plugged into a computer :-/
 
Can someone tell me from experience, does installing an rpm package manually using the rpm package manager work the same as using dnf to install packages from repositories, that is, if you want to remove a package installed with rpm does rpm remove all installed files or directories related to that package the same way that dnf does, or do you have to hunt down those installed files and remove them yourself?
 
I'm on an awk roll today
 
@MyWrathAcademia the package contents are managed in the same way; using rpm to remove a package will remove all its contents
what it won’t do is remove any now-unnecessary dependencies (which dnf will)
 
@StephenKitt thanks for answering. Glad that I don't have to do more work when I am forced to use a package that is not in the repository
@StephenKitt but I thought that rpm does not install any dependencies for a package? So any dependencies installed for a package managed by rpm would have to be installed manually by the user, or does rpm work differently now?
 
@MyWrathAcademia right, it doesn’t install any dependencies
but imagine you install package A using dnf, which requires package B
next you install package C using rpm, and package C also requires package B
remove package A, package B stays because it’s no longer needed
remove package C using rpm, package B stays even though nothing needs it
incidentally, you can use dnf to remove a package which was installed using rpm
 
4:03 PM
I don't follow. If you remove package A, wouldn't dnf also remove all dependencies it installed for package A which means that package B should also be removed. Can you elaborate?
 
When you remove package A, since package C also depends on package B, dnf won’t remove package B — it’s still needed.
 
@StephenKitt That's really interesting that dnf also considers whether packages not installed by dnf also depend on a particular package it wants to remove
 
@MyWrathAcademia it considers the overall dependency tree of all installed packages, regardless of the tool used to install them
 
@StephenKitt in that scenario, is there any way of finding out if nothing needs a package
 
@MyWrathAcademia yes, but I don’t know the exact incantation off-hand
 
4:11 PM
You could have a lot of garbage build up in your system. May be if I experience or notice that, I can ask a question on unix.stackexchange.com
The problem is how would you even know to check for a package that is nothing needs. There's probably a command to list all such packages
@StephenKitt If dnf can remove a package installed using rpm, then I'm guessing dnf can also install an rpm package that is not in the repositories (i.e. an rpm package downloaded from the internet). So what is the point of having rpm when dnf can do its job and more (i.e. installing rpm packages manuallly and also installing rpm packages from the repositories)
 
@MyWrathAcademia package-cleanup --leaves
@MyWrathAcademia same as dpkg v. apt; rpm manages individual packages, dnf manages package repositories
there are some things rpm can do that dnf can’t
 
4:31 PM
@Jesse_b Now you're just matching the literal string [^]*... You might as well use /willnevermatch/
Sorry, [^] with the last ] repeated zero or more times.
 
I don't think so
$ cat input
asd
asdd
asddd
STAC
asd
*
as
[^]*
foo
$ awk '/^STAC$/,/\[^\]*/' input
STAC
asd
*
as
[^]*
foo
$ awk '/^STAC$/,/\[^\]*/' input
STAC
asd
*
as
[^]]]
foo
 
Ah. Ok, I see what's happening. The ^ is still an anchor. You could use / ^/ too.
What you are relying on is that the end of the range never matches.
 
Thanks
Hah nice, @JeffSchaller came through with ed
@Kusalananda What about /$^/? :p
 
@Jesse_b I was waiting very patiently, but no one else wrote one up!
 
@Jesse_b Sure. Both / ^/ and /$^/ are guaranteed to never match (another one is /$ /). Breaks with BSD awk though. Works in mawk.
 
4:41 PM
I like the idea of looking for the end of the line before the beginning of the line :p
 
Actually, /$ / works iwth BSD awk... odd.
 
so it does
 
@Kusalananda A <dollar-sign> ( '$' ) shall be an anchor when used as the last character of an entire BRE
 
Hmm... But the /$ / expression does not seem to match $ followed by a space.
 
although that's in the BRE section; the ERE section words it differently
 
4:46 PM
awk uses EREs.
 
Does this command suffice to create a user with home directory?
addgroup someteam —gid=5566; adduser -G someteam -Du 5566 -d /home/someteam -m -s /bin/bash someteam; chown -R someteam $HOME
where ENV HOME /home/someteam in dockerfile
Do we need chown command?
AM trying to make sure... USER someteam directove in docker file should make shell getinto /home/someteam
 
5:05 PM
@overexchange you didn't ask, but I'll volunteer that using -d /home/someteam is then redundant; I'd suggest using $HOME there or /home/someteam in both places, for consistency. Also, adduser with -m will create the home dir and set the uid/gid for it -- no need for chown
 
But chown is a funny word
I love to chown things, I wish I could do it more often
 
@Jesse_b Kinda sound like some Japanese food?
Chow chow is a breed of dogs.
 
@JeffSchaller Issue is launching this container with ansible is giving weird results
unlike launching without ansible
we are using command ansible module to launch docker container
Probably a question would be better..
0
Q: Dockerfile - Does USER directive make shell switch to its home directory?

overexchangeAs root, We are launching docker container with ansible: FROM python:3.7-alpine3.9 ENV HOME /home/someteam RUN apk add --no-cache --virtual .build-deps python3-dev gcc linux-headers musl-dev RUN addgroup someteam --gid=5566; \ adduser -G someteam -Du 5566 -d /home/someteam -m -s /bin/ba...

script.sh is not able to use relative paths
 
@Kusalananda I think I'm going to start using it in video games to talk trash. "You just got chowned, noob"
 
5:21 PM
That would be very chmoddy of you.
 
:)
 
@Jesse_b Is that better or worse than being chrooted?
 
@derobert I'm not sure, chrooting someone sounds more violating though
 
@Jesse_b seems like someone's being a bit of a chattr. Might want to chgrp before you become get chconned.
 
/me chacls
And then there is chage. Would be nice if that could be applied to a lot of folks online. At least if it'd change the age they act.
 
5:30 PM
I could probably use that
 
choom!
I had no idea how many exciting ch* commands there were, fellow chattrs...
 
chshhhh, I'll chpass
 
chcp? How many ways can cp behave? :-/
 
seems like *nix has covered all commands from head to toe
 
@derobert well, you could uucp or lscp(u). If you want to pretend you're on an AIX box, you could imagine mkcp, rmcp, and lscp
 
5:36 PM
I just discovered I have a toilet command and it's rather offensive
pretty cool otherwise though
 
@Jesse_b wait, I thought that one printed out ascii art banners?
 
@derobert it does but it has a --gay option to make them colorful
 
@derobert that's only after a fig grows there
btw, just discovered the Wine on Windows link from the star menu -- hilarious! Notepad in Wine on WSL on Windows
 
Yep. "Windows" on "Linux" on Windows.
 
$ toilet --filter list
Available filters:
"crop": crop unused blanks
"gay": add a rainbow colour effect
"metal": add a metallic colour effect
"flip": flip horizontally
"flop": flip vertically
"180": rotate 180 degrees
"left": rotate 90 degrees counterclockwise
"right": rotate 90 degrees clockwise
"border": surround text with a border
 
5:38 PM
> I'll leave that bit to someone who knows what they're doing.
 
@Jesse_b maybe that's not supposed to be offensive, it's just a reference to the gay pride flag?
 
@derobert Yeah, it's not overly offensive, and I don't even really like using the word offensive especially in this day and age. That being said the use of the queen's english is offensive :p
 
LOL, down with the monarchy! :-/
 
Interesting bit of history the other day from a Revisionist History podcast (Malcolm Gladwell), claiming that the Boston Tea Party wasn't a revolt against tea taxes, it was tea smugglers objecting to price-fixing
 
Either way I'm glad coffee won that battle
 
5:48 PM
i heard coffee mentioned.
... hah, nice.
returns to what he was doing
 
@ThomasWard hello, goodbye! :)
 
Hi Jeff.
@derobert Monarchies suck.
@Jesse_b "use of the queen's english"?
 
@FaheemMitha "colour" vs "color"
@FaheemMitha What do you have against butterflies?
 
@Jesse_b I think that's just British spelling.
I'm not even really sure what the term "Queen's English" means.
@Jesse_b I'm fine with butterflies. It's people who are excessively privileged for no reason that I can't stand.
 
@FaheemMitha Basically "british english"
 
5:57 PM
To a first approximation, it means "talking posh".
 
sounds french
 
It's actually quite striking how few people in the UK sound like BBC announcers. There's a ton of regional acccents, and that's before considering people from other cultures.
@Jesse_b What?
 
@FaheemMitha "talking posh" sounds French, or at least some form of Canadian
 
@Jesse_b No. "posh" is British slang.
It basically translates to upper-class.
 
Still some form of dark arts
 
6:01 PM
Well, upper-middle class and above, perhaps.
But I don't have the patience or inclination to examine the dark inner workings of the British class system. That's best left to the Brits.
 
I don't like to dabble in any dark magic
Well I do use sed from time to time and I'm certain that is a tool for warlocks
 
Where does ed fit in? Or Perl?
Surely editing Perl code in ed is the highest form of dark arts.
 
@derobert ed is a tool for Jeff's so it borders on black magic. perl is just out of date black magic
ducks
 
Ok, then what about Perl 6? :-)
 
I'm not sure how we got from accents to dark magic.
And it was a short road, too.
 
6:09 PM
@FaheemMitha My short bus fits perfectly on short roads
 
@Jesse_b s/toe/tail/
 
@Kusalananda Yeah but head to toe is more commonly used I think
 
@Jesse_b Not if you're a cat.
 
@Kusalananda hah
 
man cat
 
6:14 PM
cat < <(man cat)
 
cat <( man mutt )
 
wonder what cat < cat does xD
 
-bash: cat: No such file or directory
 
... or you'll get whateve is in cat.
I don't want to know what's in my cat.
2
 
if I do cat < /bin/cat i get binary output lol
 
6:16 PM
It tends to be messy, and then the keyboard clogs up.
 
@Kusalananda fluff
 
otherwise I get the no such file or dir error xD
 
Does anyone know an easy way to do a search for two or more words, covering the possibility they might be on successive lines?
It's not super relevant to what I'm trying to do, but I'm just curious.
 
There was a Swedish comic strip in the 80s that I liked. In one episode, the main character works in a toy store, rips off the head of a teddy bear and exclaims "Just as a real bear! Cute on the outside, messy on the inside!"
Another favourite line from him (working at McDonalds or something equivalent): "You're not getting anything! You're already fat!"
 
@Kusalananda then you might get an eight(bit)ball instead of a hairball
@FaheemMitha grep -q needle haystack && grep -q furball haystack maybe?
 
6:30 PM
@JeffSchaller I'm not sure how that works.
 
@Jesse_b awk 'p += /^STAC$/' file :-)
 
@FaheemMitha in a file named haystack, it looks for the word needle and for the word furball, and returns "true" if both words are in that file
 
@JeffSchaller Oh, I see. But I want successive lines.
So "foo bar baz" should occur in a string, possibly separated by a newline.
Probably one of those terrifying regular expressions would work.
 
GNU grep maybe? grep -z 'foo\sbar\sbaz' I believe that \s is the same as [[:space:]] which should match a newline.
The -z makes GNU grep divide the file up on nuls rather than newlines.
 
That -z option does odd things with the output
 
6:39 PM
Oh, does it? I didn't actually run it.
 
@Kusalananda I take it that specifying GNU grep is necessary?
 
Ever, to be honest.
@FaheemMitha Yes, definitely.
 
Well. When I redirect it to a file vscode warns me that the file isn't readable but then if I tell it to open anyway it seems fine
not sure about other applications
 
Need to test...
Ah, it puts a nul at the very end of the output.
Well, that's good to know.
 
6
Q: grep'ping files for multiple strings (not on the same line)

Ole TangeMore often that I like to admit I look for a file that contains some strings. Currently I do: grep -rl string1 | xargs grep -l string2 | xargs grep -l string3 Is there a tool that does this prettier? This greps for string1 or string2 or string3. grep -rl -e string1 -e string2 -e string3 ...

 
6:41 PM
It could still be useful as grep -q -z ...
 
also
0
Q: Match text between two words with grep on multiple lines

Farcas PaulI know there's the a syntax you can use, like: grep -oP '.word1.*?word2' but this doesn't work on multiple lines. So here's an example input: user1:x:1001:1001::/home/user1home:/bin/bash user2:x:1002:1002::/home/user2home:/bin/bash user3:x:1003:1003::/home/user3home:/bin/bash user4:x:1004:100...

 
Anyone else just get booted from chat?
 
@Jesse_b Not recently.
Did you?
 
I did
When I tried to refresh it said I couldn't establish a secure connection, the main site was slow to load as well
 
@Jesse_b Using GNU tools does that to some, I've heard.
 
6:43 PM
@JeffSchaller cgrep sounds useful.
 
@Jesse_b No issues here.
 
@Jesse_b that's just the NSA installing the SSL middle-man, don't worry about it
 
@Kusalananda Probably just my FBI agent messing with me
@JeffSchaller =)
 
maybe I mis-read their badge ;)
is-it-decrypted-for-everyone-or-just-me.com
 
I was arguing with someone on the politics SE about the age of consent yesterday so I'm sure the number of lists I am on increased
really no way to have that conversation without sounding like a pervert
 
6:47 PM
boy, between that and the chainsaws and the warlocks, you're covered
 
Well I may get into chainsaws from time to time but I certainly don't mess with any of the dark arts
 
Still no idea what any of this has to do with dark arts.
 
@Jesse_b could you list all of the dark arts that you say you're not into? ;)
and did you ever buy a chainsaw?
 
@JeffSchaller Debian, perhaps.
 
@JeffSchaller You know like making tinctures and collecting frog eyeballs and stuff
And yes, definitely debian based distributions
 
6:50 PM
As everyone knows, being a Satanist and being a Debian user are highly comparable.
 
@JeffSchaller I have not. I think if I start any new projects within the next 5 years my wife is going to poison my coffee
 
Agent Smith just wants to know what brand of chainsaw you purchased from Home Depot on July 20th for $149.99
@Jesse_b I resemble that!
 
This is why chainsaws are better than wives
A chainsaw will never get mad at you for spending all weekend in your workshop
 
7:22 PM
A chainsaw could also help @Kusalananda figure out what's inside his cat
 
@Jesse_b You could switch to herbal tea.
Is it hard to set up an Android phone to send and receive emails from Gmail?
 
@FaheemMitha It's very easy
 
@Jesse_b Ok. Thanks.
 
There is a gmail app but you can also do it with whatever the phone's default mail app is too
 
@Jesse_b What's more secure?
 
7:25 PM
@FaheemMitha I don't know
 
Though it's a one time thing, so it probably does not matter.
@Jesse_b Ok.
 
Presumably neither as both are ultimately controlled by google
 
I rarely use my Gmail account, but I do have one.
 
I just suggested someone install powershell on linux and wasn't being facetious
 
7:41 PM
So, would the Gmail app be the easiest? I did a quick search online, and that was a common suggestion Because it's easy, I suppose.
 
@FaheemMitha Honestly I've only set them up like 4 times total (each time I get a new phone) and it's been a while since the last time but I think both apps, on my phone anyway, were virtually identical
You basically just enter your username and password and it does the rest
 
@Jesse_b Both apps?
You mean the Gmail app and some other app?
 
@FaheemMitha The default phone's "mail" app vs the "gmail" app
 
And can you send as well as receive emails with no problem?
 
correct
 
7:44 PM
@Jesse_b Assuming the phone has a different default mail app.
 
Although I very rarely send mail from my phone
I'm not sure if I have done it within the last 2-3 years
 
I'll just use Gmail, I think. It's easiest. I don't want to involve my real email address in this.
@Jesse_b Ok. Well, as long as it is easy. Need to test, I guess.
 
@FaheemMitha All of the android phones I've had so far come with a mail app that is just called "mail"
 
@Jesse_b I see. I'll check my phone.
 
I think the mail app only allows you to connect to one account at a time though, the gmail app does let me sign in to both my work email and personal email and it's very easy to switch between the two
 
7:46 PM
@Jesse_b Yes, I have one called "Email".
But I think I'll just use the Gmail app and my Gmail address. It's a one time thing.
 
 
2 hours later…
10:03 PM
0
Q: How to make ansible task run on only one host? for each app

overexchangeThis answer did not help. The playbook looks like: - name: play1 hosts: - all gather_facts: true remote_user: someteam roles: - role: role1 - role: role2 - role: role3 when: apps_var|length > 0 Specifically for role3, In ../roles/role3/tasks/main.yml, the tasks l...

 

« first day (3226 days earlier)      last day (1729 days later) »