« first day (2539 days earlier)      last day (2398 days later) » 

12:59 AM
@Kusalananda well you can escape stuff - but if you have a source on multiple here-documents I'd appreciate it.
The bash manual doesn't explain, nor does several other sources on bash.
 
1:58 AM
Is there something like a closure in bash?
 
 
1 hour later…
3:07 AM
I think I have it all figured out now... basically I do the here-doc without quotes on the delimiter word and escape all ', `, and $`s that I want lazily calc'd.
And BTW parsing those BASH error messages is NOT easy.
 
 
3 hours later…
6:06 AM
@AaronHall There have been users on the site that have tried to use here-documents for absolutely everything. That's not what they are for.
@AaronHall Yes, that's one way of doing it.
@AaronHall This is possibly wrong, technically, but I think the overall image of it is correct: A here-document is basically like a string passed through echo. To get echo to output an unprocessed command substitution or variable substitution while having the shell process other variable substitutions etc., you would have to escape the relevant $.
 
 
3 hours later…
9:01 AM
Some seems very obsessed with seeing the progress of commands at they are executed. Why not check on the output file to make sure something is written and then switch to do something else?
(having another foul mood morning over here, will try to find cute cat pictures to fix it)
 
@Kusalananda Sorry to hear that. On the plus side, the rain has stopped over here.
 
@FaheemMitha Had a nice walk yesterday: instagram.com/p/BZRRJRkn4-h
 
why doing it simple when you could do it more complex (and stumble your foot on carpet) ? unix.stackexchange.com/questions/393575/… (10K+ rep only)
 
@Kusalananda Scenic. Is that a cow? A deer?
 
@FaheemMitha Definitely a cow :-)
 
9:07 AM
@Kusalananda ok
 
oh deer, it's a cow !!
 
I hear a lot about heredocs. Maybe I should know what they are.
 
@FaheemMitha just cat <<foobarbaz .... foobarbaz construct
 
@Archemar I saw that' but couldn't answer since I didn't know what the input looked like and the given function was too much for my morning brain.
 
In computing, a here document (here-document, here-text, heredoc, hereis, here-string or here-script) is a file literal or input stream literal: it is a section of a source code file that is treated as if it were a separate file. The term is also used for a form of multiline string literals that use similar syntax, preserving line breaks and other whitespace (including indentation) in the text. Here documents originate in the Unix shell, and are found in sh, csh, ksh, bash and zsh, among others. Here document-style string literals are found in various high-level languages, notably the Perl ...
 
9:11 AM
@Kusalananda I didn't answer either, just a comment. that was purely poor scripting (no blame, I might do that kind of mistake)
 
Hmm... nobody has come up with a fun "there-document" or "where-document" definition...
(back to work now)
 
 
4 hours later…
12:59 PM
Why do the definitions never include the word "herein" which I believe is what it is based off
 
@Jesse_b I think it comes from "here you are, a document" :-)
 
lol. Herein means: "in this document or book." though
I always say "herein" when I refer to one out loud
 
Why would heredocs have anything to do with herein?
 
because they are what that word means.
 
1:15 PM
@Jesse_b "herein" is too long to type, just sayin
 
shorter than "heredoc" :p
 
"here doc, here doc, come here doc! Stop digging in that flowerpot doc!"
 
also it uses "hereis" in the definition which is not even a legitimate word and essentially means the same as "herein"
 
@Jesse_b Um. No? Not really. As you said herein means here, within. I really don't see any connection to the heredoc concept and the history of the name also doesn't support any link to herein:
13
A: Why is it called a 'Here Document'?

BlrflSome teleprinters* had a sequence of a dozen or two characters that could be programmed (mechanically) into the unit and was sent when the host sent an ENQ character or the operator pressed the HERE IS key on the keyboard. A number of glass-tube terminals had the same feature. A "here-is" docum...

 
How is "here, within" not what a here document is?
 
1:24 PM
I don't see it.
It's a here document, as opposed to a there document (a file). It isn't contained inside something, it isn't herein. I really don't see any connection.
 
It is contained. It's within the original document but set aside as something special.
it's contained inside the delimiter
I do stand corrected about the use of 'hereis' based on your link though.
 
1:46 PM
11 hours ago, by Aaron Hall
I think I have it all figured out now... basically I do the here-doc without quotes on the delimiter word and escape all ', `, and $`s that I want lazily calc'd.
The backtick should be a backslash...
 
2:32 PM
Again, thanks for the help peoples. Cheers!
 
 
3 hours later…
5:21 PM
Any idea why Arch says [ Failed ] mounting /home on (re)boot? I created it NTFS
Is there a way to know if that is really true? Cause if I do a lsblk, /dev/sda2 where it should be /home, the mountpoint label is empty, so I assume it is not really mounted and /home is inside /dev/sda1 under /
 
6:22 PM
@Lorthas A Windows filesystem as /home? Why?
 
6:41 PM
I read that windows does not support ext4 but I thought linux supported, at least I recall reading it somewhere
I mean, I thought linux supported NTFS as well, or maybe it was another file syste,. I read that served for sharing between the 2 OS
 
@Lorthas Of course Linux support ext4. It's a native filesystem.
@Lorthas It supports ntfs too, afaik.
But you might need to load a module. It's not core functionality.
 
I think he meant to say "I read that windows does not support ext4 but I thought linux supported NTFS"
 
@Jesse_b That does make more sense.
 
YES, i corrected myself later
sorry, caps
 
 
2 hours later…
8:49 PM
I managed to solve the /home problem formatting it to ext4 and updating the fstab file.
Now the network works on reboot as well while it did not before the fix.
The problem now is that after dhcpcd, the boot waits for 1:30 minute starting sys-subsystem--net-devices-neth0.device which a rule I set previously on /etc/udev/rules.d/10-network.rules, but even after renaming and commenting lines in it, the boot keeps waiting 1:30.
and aliases are not saved after rebooting as well...
 
9:40 PM
@Kusalananda I semi disagree with your closure of that question
 
@Jesse_b Hold on, let me revisit it.
 
Yes, because he didn't specifically ask to use environmental variables...ultimately I feel like he's just trying to find a way to pass those values to his script...positional parameters may be acceptable for him
 
@Jesse_b He did specifically ask about how to set an environment variable to the value of a bash array. That's what he asks.
 
he never said environment -.-
 
ARR1=(5 6 7 8) bash script.sh
That's what he does.
 
9:50 PM
I understand that now but still he is not saying "How do I pass an environment variable to my script" . I feel he's saying "How do I get these values in my script"
 
The linked duplicate has answers that address this.
 
fair enough :p
 
I may expand my answer there to take command line arguments into account too.
You did raise a fair point, and I'm happy you pinged me here.
 
Meh, I'm always wrong lol.
 
@Jesse_b Nope, I disagree. If you have a concerns, especially when I've been using one of my big golden hammers to close a question, then I'd be more than happy to revisit my decision. In this particular case, it prompted me to expand on an existing answer, which was good.
 
10:20 PM
@Kusalananda You have big golden hammers? 24 carat, I hope.
 
@FaheemMitha Huge ones!
One for bash questions, and another one for shell questions.
 
@Kusalananda Do they help you fly as well?
 
@FaheemMitha Unfortunately not. They more often bring me down to the ground!
 
@Kusalananda Nothing is perfect.
 
With great power comes great responsibility, and ever so often, great regret.
 
10:23 PM
@Kusalananda You need a superhero costume.
Something tasteful in black and white, perhaps.
 
@FaheemMitha I'm working on increasing the length of my beard and the tangles in my hair, that'll be enough.
 

« first day (2539 days earlier)      last day (2398 days later) »