« first day (2695 days earlier)      last day (2277 days later) » 

12:26 AM
@cas /usr/bin/perl can't parse perl, only run it :-D
whatever / 25 ; # / ; die "this dies!"; is the famous example, from Randal Schwartz
if you have a sub whatever(); that's a function call to whatever(), divided by 25, then a comment
if you have sub whatever($) { } instead, then it's a function call to whatever, taking one argument (the regex / 25 # /) , followed by a die statement
and of course you can do BEGIN { if (rand > 0.5) { eval "sub whatever() {}" } else { eval "sub whatever($) {}" }}; in front...
which I haven't tested all of this, but should work :-P
of course, at first glance that's pathological — but running code during compile is common in perl. It's what use does.
perlmonks.org/index.pl?node_id=44722 seems to be where it comes from
And that ignores source filters... (e.g., as the Switch module that people used to use)
 
1:09 AM
@derobert, dear $DEITY :D
 
$ perl -E 'dear $DEITY'
Can't call method "dear" on an undefined value at -e line 1.
... guess that confirms perl is an atheist.
(and I'd have to scratch my head for a while to figure out why it tried that as a method call!)
 
 
3 hours later…
4:21 AM
Hello, is there a way to pipe all commands through a certain command? (dos2unix) in this case. I want, from personal reasons I prefer not to dive into, to pipe (post processes) all my commands in dos2unix.
 
cas
@user9303970 no. you need to stop thinking there's some magical way of getting bash (or whatever) to do whatever you happen to need at the time without you needing to do anything. DWIM magic does not exist, and computers can not read your mind. This is why people write scripts and other programs - to make computers do what they want them to do.
 
4:37 AM
dos2unix | bash
 
4:51 AM
One could answer here:
0
Q: Postprocess all Bash commands to remove Windows characters after copy-pasting from Windows to Linux-Bash

user9303970I use Windows 10 as main OS and SSH to remote Linux (Ubuntu) environments with Putty. I don't intent to use another SSH client rather then Putty. I have problems copying data from win10 into Linux (especially when copying heredocuments). For example: Windows 10 EOLs are added. Sometimes hered...

 
 
4 hours later…
9:15 AM
@user9303970 I posted a comment on your SO question giving two examples of things one of your sed lines would break. I think you ought to find a new way to move code to your Ubuntu box, because if copy & paste isn't working, trying to use text filtering to undo the damage sounds like much more effort than finding an alternative (or fixing copy & paste).
 
@user9303970 Maybe setting up something like Syncthing between a directory on either host may be a good solution?
 
9:31 AM
BTW: If anyone has XFS (filesystem) knowledge, unix.stackexchange.com/questions/426212/… is probably an easy question.
 
 
5 hours later…
2:51 PM
Hi. Can somebody help me? I have an issue with python on CentOS.
Resuming my problem, I don't know how to open python on a different saving folder. How can I do it, either permanently or with the shortcut commands (like I describe on the post)?
 
3:17 PM
@SaclyrBarlonium Sorry, I'm not using a desktop manager, so I know nothing about desktop shortcuts. It looks as if it's using the working directory of whatever it is that starts the utility, which happens to be the same as $HOME.
 
 
1 hour later…
4:32 PM
@Kusalananda could you advice me please? I'm 99.9% sure you saw my message but not 100%, please share advice, I'm starting to lose any hope on this...
 
@user9303970 I suggested Syncthing for synchronizing two folders between Windows and Linux, but now I remembered that part of your workflow involves copying text from a web page, so that suggestion may not have been very good to start with.
 
Indeed @Kusalananda I copy from a webpage so copied content (especially heredocuments) is still a paiinful problem... :\
I so want to keep using DigitalOcean, I don't want a shared server just because heredocuments and curl calls isn't a good solution in this case because copying functions with heredocuments, each function at a time help me debug very comfortablly.
I can't believe there isn't any way to pipe all commands whatsoever in some utility... Is there really no way?
However it is wired, it will save me here.
However unconventional, this seems to be my medicine here as a Windows user.
 
4:54 PM
Well, if anyone knows a way, you're super welcome to share, you would save me from using a shared server for a long period, in this case.
 
@Kusalananda, Thank you for the help. but using the shortcut is only one of the possible solutions I'm trying. Do you know how I can change python saving folder (which happens to be $HOME) to another permanently forever? That would be even greater.
 
5:22 PM
?
Changing with commands in shell, per example.
 
@SaclyrBarlonium Does it maybe depend from which folder you start Python from? If you first cd to the folder you want to work in. That's how most programs work anyway.
@user9303970 I'm totally unfamiliar with that way of working so I can't help you there I'm afraid. I also use a Windows machine and PuTTY, but I do all my work on the Unix side of things. I really only use Windows for PuTTY and Chrome, and then I have a full screen PuTTY terminal where ther real work happens.
 
6:16 PM
@Kusalananda Well, If I open the shell and change the current directory, it works, but I want to avoid that kind of work. I'm asking some kind of automatic way of doing it, like using that shortcut command, like I do to open IDLE. I can also open it with shell, but using a shortcut it's faster and more comfortable.
Or changing it forever, like changing it in a file. I don't know.
 
6:38 PM
@SaclyrBarlonium If the command to start idle is idle, you could set up an alias for starting it in the shell, like alias idle='cd my_directory && command idle' (command is a built-in command that ensures that you won't call an alias or function from within the alias).
 
7:22 PM
@Kusalananda Thank you. I will check on that. I will report later. :)
 
Finally a good (JavaScript) approach to my Windows-Putty-Linux problem?
0
Q: JavaScript: Cut all leading spaces (whitespaces/tabulations) and CRLFs when copying from web

user9303970I desire to copy some executable Bash code directly from my personal GitHub account, into Bash, to execute directly. The relevant code is the first Bash function here (also pasted here below), containing a Bash here-document, indented with leading tab indentations: preparations() { cat <<-EOF

 

« first day (2695 days earlier)      last day (2277 days later) »