« first day (3237 days earlier)      last day (33 days later) » 

7:01 AM
I wonder if this qualifies as an answer. Possibly it does.
A: SANE fails to open scanner device - local IP address change possibly responsible

celemGuided by what Faheem Mitha wrote, I fixed my problem with simple-scan crashing on image scan. My original brsanenetdevice4.cfg contained one line: DEVICE=MFC-L2710DW , "" , Unknown , IP-ADDRESS= When I changed to the line below - fixed - no more crashes: DEVICE=MFC-L2710DW-Sca...

I'm inclined to think it's not an answer, at a second look. In fact, it's not even obvious how it's related to my question or answer.
Shall I suggest the poster delete it, and write a comment instead? Or can a mod convert it?
Should I raise a flag?
7:33 AM
@FaheemMitha when in doubt, flag it ;-) (I have done so in this case, let’s see what the voters think.)
8:17 AM
@StephenKitt I saw the flag in the mod queue and I'm leaving it for the reviewers (I tend to handle clear cases straight away, but this is not that clear).
@Kusalananda yeah that’s one of the nice things about the NAA flag, it pushes answers to the LQ queue so mods don’t need to get involved (but I don’t know whether your flag-handling interface makes that obvious)
Ubuntu has now been demoted from "operating system" to "app"? unix.stackexchange.com/questions/536399
@Kusalananda well, on Windows you install it from the app store ;-)
@StephenKitt It makes it obvious, no worries. We handle those as time permits (there's usually not too many of them).
And our sick cat has pooed on the floor in the hallway, and stepped in it.
It's not quite as bad as running a robot vacuum over a pile of dog poo, but it stinks :-/
@Kusalananda wow I thought cat poo would be pretty bad, but vacuuming dog poo, wow
8:28 AM
Either I terribly phrased my question or I don't know why:

wget "${target_url}" -O - | tar -xzvf -C ${war}/${domain}

This fails with:

Cannot write to `-` (Success)"./
@StephenKitt Never done it myself (we don't have a dog), but I'v seen pictures...
@JohnDoea You are asking tar to read a file called -C.
You want -f -
@Kusalananda or no -f option at all
@StephenKitt Depends on the tar.
@Kusalananda they don’t all read from stdin by default? Oh, I imagine some would read from tape instead...
@JohnDoea Also, but I'm unsure about this since I don't use wget, the URL should be the last argument on the command line of wget.
8:31 AM
@Kusalananda no, it doesn’t have to be ;-)
@StephenKitt So it's GNU-ified.
@Kusalananda yes, options and arguments can be mixed
The commands here are exactly the ones I ran to verify my answer:
A: Piping a file (tar) from a download program (wget)

Stephen KittYou can combine both commands and skip writing a file by instructing wget to write to its standard output: wget https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.0.tar.gz -O - | tar -xzv This will cause tar’s output to be mixed with wget’s progress indicator, because it will start e...

Removing -C I stay with same error

I desire to download the "data" of MediaWiki to STDOUT, piping it as STDIN to tar and extract that to a directory file in a predefined location.
8:33 AM
@JohnDoea The pipeline fail because tar can't find the -C file to read from, so wget can't write to the pipe.
@JohnDoea copy and paste the command from my answer
don’t re-type it, paste it
@JohnDoea You want -f -, as I mentioned above, or whatever Stephen wrote in his answer.
@Kusalananda I think the error is coming from wget, not tar
@StephenKitt Yes, wget can't write to the pipe.
@StephenKitt Your experiment seems to be over already. Too bad, I was hoping for something more thrilling.
8:35 AM
I must change at least one path, but OK.
(tar wouldn’t complain about not being able to write to -, would it?)
@fra-san yeah, disputed
@StephenKitt There ought to be an error from tar about not finding -C to read from.
@Kusalananda yes, “-C: Cannot open: No such file or directory”

This fails:

wget https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.0.tar.gz -O - | tar -xzv -C ${war}/${domain}

I just added ${war}/${domain} because that's where I want to created the renamed (latest) MediaWiki directory

Cannot write to '-' (Success)
@JohnDoea with no error from tar at all?
8:41 AM
tar: /home/user/public_html/example.com: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now
wget -O - releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.0.tar.gz | tar -xzv -C ${war}/${domain}
work any better?
@JohnDoea ah, that explains it!
You need to create the directory first.
tar fails, exits, which closes the pipe, and wget can’t write to it.
Oh I see
Many cases I thought that if I give a path the directory should be created,
Maybe it never happened just because Unix philosophy?
user expected to always use mkdir first
Not sure about the Unix philosophy (it’s expected on non-Unix OSs too), but in general users need to create things they want to use before using them.
@JohnDoea just out of curiosity, if you were really after piping the data, why did you accept terdon’s answer?
@StephenKitt because he explained something I knew and "forgot" after about 2 years; that (regular) files type of "data" cannot be piped, only "data" which will not be saved to a (regular) file can.

This made me understand another serious mistake I had besides not using mkdir first --- trying to pipe a file and not just "it's data". Terdon's explanation made me to "recall" that which I have "forgotten" about piping.
I was thinking earlier that if I had redundant reputation points I would bounty your answer symbolically because it serves as another answer by itself.
8:57 AM
@JohnDoea I don’t care about the rep, I was curious based on the usefulness of the Q&A for you and others: you ask one question, but the accepted answer doesn’t address the issue in your question title.
(Feel free to edit your question to match the answer, of course!)
I believed you didn't care about the rep...
I am not sure why you think it doesn't address the title - terdon dealt with a piping problem I had and the bad code I wrote.
@JohnDoea your question title is “Piping a file (tar) from a download program (wget)”, and you say “I desire to download a file, pipe that stream to tar to untar it in a specific location.” terdon explains what’s wrong with the commands you tried, and shows how to correctly save the file to disk and extract it from there; he doesn’t explain how to pipe the file from wget to tar.
You could change your question to “What’s wrong with my attempt to pipe from wget to tar?” and rephrase your first sentence, that would perhaps more accurately reflect what you’re really after.
9:17 AM
@StephenKitt I edited the question similarly.
Please consider reading my comment to terdon.
Thank you,
@StephenKitt directories, not files. Maybe that's what confused JohnDoea. Since echo foo > file creates the file, I can see how you'd expect echo foo ? /dir/file to also create dir.
@terdon yeah, and that also goes into the distinction between what the shell does and what commands do, which also creates a lot of confusion
I read in the past a directory is a file (type) but not a "regular" file

The difference between "data", "stream" ("piece of data" as I can roughly define it), consolidating a stream to a file or not (thus keeping or not keeping it as "STDIN" that can be piped to another program), can be confusing for an amateur like myself who doesn't work with shell scripting daily and isn't a professional sysadmin.

One and a half year past and I forgot what -O does...
10:20 AM
@Kusalananda Nasty. I hope your cat is not seriously ill.
@FaheemMitha Inflammation of the pancreas.
@Kusalananda That sounds bad. Is it chronic?
Pretty much. It also gives her diabetes.
@Kusalananda Bummer. Diabetes is horrible.
@FaheemMitha And cats can't really convey how they are feeling or where it hurts.
10:49 AM
@Kusalananda That too.
1 hour later…
12:05 PM
Any GNUisms here?
A: awk - problem with printf

terdonYou can play with awk's record separator (RS) here. Setting it to ================================================== lets you treat each set of values associated with a single product as a single "line". If you then set the output field separator (OFS) to ; and the input field separator (FS, or t...

@Kusalananda does that work on BSD awk/sed?
I think there's nothing non-POSIX there but I'm not sure.
@terdon so do I
You can add the -P option to gawk to disable the GNU extensions
Ooh! Nice, thanks.
Aaaaand, it breaks :/
@terdon because of the regex?
Dunno yet, but it looks like it doesn't grok the RS. I get many many more lines of output and they're all empty fields (it's printing ;;), so it looks like the RS isn't working.
Yes. Each = is taken as a record separator.
@StephenKitt congrats on a false 200k! (roll-up says "200k" while your actual rep is a few points short)
12:12 PM
Got it:
$ awk -P -v RS='='       -v OFS=';'       -F'[\n:]'       'NR%50==1 && $2{print $16,$3,$7}' file
 PC-000-0; Microsoft Office Professional 2013; 00000-00000-00000-00000-00000
 PC-000-0; Windows 10 Pro; 00000-00000-00000-00000-00000
@terdon yup, RS as a regex is a GNU extension
@StephenKitt It isn't.
@JeffSchaller thanks, 154 to go...
I had checked.
@terdon oh, the gawk docs list that as a GNU extension
12:14 PM
> FS
Input field separator **regular expression**; a <space> by default.
Input field separator regular expression; a <space> by default.
Emphasis would have been mine had the emphasis worked. Anyway, POSIX says "regular expression".
RS! Not FS!
@terdon AIX's man page for awk says only Input record separator (default is a new-line character).
But I’m talking about RS.
13 secs ago, by terdon
RS! Not FS!
Juuuust quick enough :P
Synchronicity ;-)
The GNU EXTENSIONS section of the manpage lists
> The use of RS as a regular expression.
12:15 PM
> RS
The first character of the string value of RS shall be the input record separator; a <newline> by default. If RS contains more than one character, the results are unspecified. If RS is null, then records are separated by sequences consisting of a <newline> plus one or more blank lines, leading or trailing blank lines shall not result in empty records at the beginning or end of the input, and a <newline> shall always be a field separator, no matter what the value of FS is.
Yeah. POSIX has it as unspecified.
But string if it's a single character. So . wouldn't work.
@terdon short for “there are multiple, non-reconcilable implementations, and we don’t want to make a fuss” ;-)
heh, yeah
2 hours later…
2:09 PM
@terdon Your answer looks correct.
@Kusalananda Thanks. Stephen told me about gawk's -P flag which I can now use to test!
              This  turns on compatibility mode, with the following additional

              • \x escape sequences are not recognized.

              • You cannot continue lines after ?  and :.

              • The synonym func for the keyword function is not recognized.

              • The operators ** and **= cannot be used in place of ^ and ^=.
@Kusalananda don't you run some sort of *BSD? What do you get from ls -l /bin/sh /bin/sh/?
(the trailing question mark is English, not shell)
@JeffSchaller And the duplicate target?
Ah, never mind, I hadn't seen the slash
2:25 PM
@terdon yeah, I'm curious to see who all has liberally interpreted previous specs to allow trailing slashes on files
@JeffSchaller Unable to test right now. Walking. Soon.
Waiting for pizza.
Don't bait him, @Jeff. You know how bad BSD is at multitasking! :P
(I have absolutely no idea how good or bad BSD is for multitasking, and I assume it's as excellent as any other OS)
I'm personally very bad at multitasking, so I don't worry...
@Kusalananda this is way less important than walking or pizza, so take your time! :)
3:04 PM
I also suck at multitasking, but BSD probably doesn't.
3:26 PM
[eeyore] % ls -l /bin/sh /bin/sh/
ls: /bin/sh/: Not a directory
-r-xr-xr-x  3 root  bin  625032 Aug 20 07:48 /bin/sh
@JeffSchaller ^^
That's on OpenBSD. I unfortunately don't have a working FreeBSD or NetBSD VM at the moment.
On macOS:
ls: /bin/sh/: Not a directory
-r-xr-xr-x  1 root  wheel  618480 May  4 09:05 /bin/sh
4:10 PM
Sigh. Sorry @Kusalananda, I really should learn to read the text of an answer as well as the code!
So Bitbucket has dropped Mercurial support. Not surprising.
4:56 PM
@terdon No worries whatsoever.
A decent Kali question!
Q: Kali linux - Crontab @reboot is not executing

Roberto ManfredaI'm on Kali Linux with VERSION_ID="2019.3" uname -a Linux kali 4.19.0-kali5-amd64 #1 SMP Debian 4.19.37-6kali1 (2019-07-22) x86_64 GNU/LINUX Trying to execute adjust_timezone.sh placed in /usr/local/startup_scripts/ #!/bin/sh echo "Adjusting timezone..."; ntpdate in.pool.ntp.o...

5:13 PM
Anyone able to help someone with a broken apt package manager? unix.stackexchange.com/questions/536415/…
5:28 PM
@Kusalananda thank you!
@JeffSchaller Also, the pizza was good.
@Kusalananda even better! Hopefully the walk was nice, too
@JeffSchaller Not too shambly.
@Kusalananda hopefully it was more amble than shamble :)
I'm well gruntled in any case.
5:44 PM
@Kusalananda Posted a comment. Someone broke his/her system, I think.
That's quite common, I imagine. Though most people who break their system don't come here asking for help.
4 hours later…
10:20 PM
@MichaelHomer The only thing they seem to be hiding is the names of the users who voted to close it (but not to the author).
I think they're also hiding the reason, but it's not completely clear
I really don't get the point or fuss about hiding the close-voters but maybe it's an issue on SO

« first day (3237 days earlier)      last day (33 days later) »