« first day (2721 days earlier)      last day (2248 days later) » 

8:08 AM
@Tim That question is now reopened.
 
 
1 hour later…
9:13 AM
Hei @step
 
Hello @TheSebM8
 
@Tim I really don't understand what part of your question has not been answered in Gilles post ?
 
Do you have any suggestions how to copy specific file from remote host to remote? Im currently using scp root@192.168.1.56:/root/info.txt ./info.txt but i want that the file i copy from remote server, would add the data to the file, not overwrite it
from remote host to local*
 
@TheSebM8 the same with rsync -a I think
 
@TheSebM8 rsync --append, but you’d be better off asking a full-blown question on the main site
oh wait, you’re on your fact-gathering mission
so rsync won’t do the right thing
ssh root@192.168.1.56 'cat >> /root/info.txt' < /root/info.txt
should work @TheSebM8
maybe with a sh -c thrown in
 
9:21 AM
ok I was not reading properly
 
Yea, both files on both machines have content inside them and the content from remote machine has to be copied over to local machine. so both content is kept. ill try what u wrote Stephen :P
 
oh wait @TheSebM8, from remote to local
so it’s the other way
ssh root@192.168.1.56 cat /root/info.txt >> /root/info.txt
 
oh @StephenKitt this one worked yes :P thank you !
 
 
1 hour later…
10:32 AM
Does anyone have an idea why it gives me my wrong public IP address? (using the following command " curl ipinfo.io/ip " )
My ip should end with .236, yet gives me .227
 
@TheSebM8 it does give my correct IP no proxy or stuff like that ?
 
no, nothing like that
 
what this one give you ?
 
It works perfectly on 2 machines out of 9. The rest has wrong IPs
That one also gives me wrong ip
(im connected in Wi-Fi) so im not in the cable network
Im sadly back to the copying part.
How would one copy text from 3 different files into one and making a new file out of the 3 whilst the 3 files still contain their old information?
Basically.
File1: Hello
File2: Dear
File3: World

And file 4 would be:
Hello
Dear
World
 
10:56 AM
@TheSebM8 cat File[123] >newfile
or cat File1 File2 File3 >newfile
 
Thanks, i just realised this myself also
 
11:29 AM
I made a new post, had to do it as i sadly could not get my public IP right.
https://unix.stackexchange.com/questions/432803/machine-public-ip
 
 
2 hours later…
1:19 PM
@terdon, what’s the deal with
1
Q: Run script and not lose access to prompt / terminal

200mgI am running jmeter by launching the .sh script, once I do that I cannot start using the prompt again unless I ctrl-z, ctrl-c, or the script ends in some other way. How can I launch that script and still be able to use the same console after the script is launched. (i used to know how to do thi...

is the “We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.” banner what happens when an accepted answer is flagged NAA?
 
Tim
@Kusalananda Thanks.
 
1:42 PM
@StephenKitt No, that's a "mod notice", a mod-only feature. I didn't add it, but I can see why one of the others might have. That answer is accepted, so deleting it is problematic, so the notice i) sends a clear "please fix this" message to the OP and ii) shows the community at large that this isn't considered up to snuff, despite its being accepted.
 
@terdon ah right, thanks
 
@terdon That's a really good thing to have.
... on some answers.
 
yep
 
2:39 PM
For people who have sufficient rep on SO, does this question have deleted answers?
I suppose it might make more sense to ask in a SO chatroom, but I'm lazy.
Also, random interesting comment:
+1 For VPN, In Colombia, I realized that Avianca and friends hide an entire fare class from you (the cheapest one) when you're not visiting their site from a Colombian IP address. On top of that their prices in USD/foreign currency are often use a horribly expensive exchange rate versus the real one. So I book using a Colombian IP and pay in COP with a "travel" (no forex fee) credit card, or a local debit card from a relative. — unknownprotocol 10 hours ago
It pays to be a savvy traveller.
 
 
2 hours later…
4:34 PM
Hello Chat I have an opinion base question for you, I have several csv file generated and I need to extract some data from it such as hom much time one occurence occur, how many tmes I can find two time the same column on the same line Well at least Four metrics like that. I know perfectly how to extract those data with things like grep file | cut -d';' -f2,4 | sort uniq for example
but I have to read at least 5 times each files and it's really long because those CSV are between 500MB and 5GB
How could I work on those files without having to read them again each time I want to extract a data ?
 
@Kiwy Write an AWK script to process all the data in a single pass, or use a CSV-capable tool such as Miller perhaps?
 
@StephenKitt I was afraid someone said the word AWK :D I never truly understand nor try to learn awk it really looks .....
Meh...
 
@Kiwy you could use Python or Perl if you prefer, or any number of languages
 
My file looks like this
timestamp;fullpath;event;size
1521540649.02;config.cfg;IN_OPEN;2324
1521540649.02;config.cfg;IN_ACCESS;2324
1521540649.02;config.cfg;IN_CLOSE_NOWRITE;2324
1521540649.02;quad_list_14.json;IN_OPEN;2160
1521540649.03;quad_list_14.json;IN_ACCESS;2160
and once I need to extract all uniq filename and count of event by filename that would be a good example
could you achieve that with awk by reading the file only once ? knowing that the file is 5 GB big ? @StephenKitt
 
@Kiwy yes, you could do that with AWK
 
4:43 PM
I have edited my question :D
 
and my answer still applies, × 2
 
awk would work nicely unless the ; delimiter is part of a field somewhere.
 
good point @Kusalananda
 
@Kusalananda no ; is a delimiter that will never be in a field
 
@Kiwy is that guaranteed? ; is a valid character in a filename
 
4:47 PM
Yes Garanted and if this would happen I could change the script that generate my csv to change this character, but I've never seen that for now.
also I could threaten the developer that decided to name a file with ; in a batch treatment
OK then, I might ask some questions on awk in the day to come then :D
 
heh
22
Q: How to view all the content in an awk array?

ZenIn my understanding, awk array is something like python dict. So I write down the code bellow to explore it: awk '{my_dict[$1] = $2} END { print my_dict}' zen And I got: awk: can't read value of my_dict; it's an array name. As the first column isn`t a number, how could I read the total conte...

will come in handy for the END processing
all you need to do then is accumulate counts in an array
 
5:23 PM
@StephenKitt Thank you, I will try to find out a way to do that, but I'm definitely sad that I didn't listen when my teacher was trying to explain me that awk was one of the most powerfull tool to handle file and I was like how no I have grep sed and cut I don't care...
well time for me to learn
 
5:40 PM
@FaheemMitha I don't see any deleted answers there.
(Curious why it matters...)
 
6:31 PM
@derobert It doesn't really. That's an old question. When I answered it, I recall there being several answers already. But now I see only one answer older than mine.
 
7:20 PM
@FaheemMitha Clearly Stack Overflow is gaslighting you...
 
@derobert Unlikely.
 
I should hope so. If you felt it likely, I doubt it'd work.
 
@derobert I think the gaslighting thing assumes you care. Also, that you think you're sane. As to the first, I don't. As to the second, I'm frequently unsure.
 
I mean, if a politician denies saying something you clearly remember him/her saying... it doesn't work, you expect politicians to lie.
@FaheemMitha Well, on the second, that could mean that they've already succeeded.
 
I have vague memories of watching a film with Ingrid Bergman with that title.
Possibly by Hitchcock.
 
7:24 PM
Don't know who directed it. Could surely look it up.
 
@derobert If I'm insane, I doubt SO had much to do with it.
 
I think it was what, early 30s?
Nope, 40s apparently.
 
@derobert What was?
 
The film Gaslight (well, both of them)
 
@derobert Ah.
Dunno, I would guess 40s. Maybe later.
 
7:25 PM
Gaslight is an American 1944 mystery-thriller film, adapted from Patrick Hamilton's 1938 play Gas Light, about a woman whose husband slowly manipulates her into believing that she is going insane. The film was nominated for seven Academy Awards, including Best Picture, Best Actor and Best Screenplay; it also won the Academy Award for Best Actress and Best Production Design. The 1944 version was the second version to be filmed, following the British film Gaslight, directed by Thorold Dickinson and released in 1940. This 1944 version was directed by George Cukor and starred Ingrid Bergman, Charles...
 
Ingrid Bergman didn't have that long a career, did she?
She ran off with a Swedish film director, or something. That kind of put a crimp on things.
 
No idea...
Definitely not up on my WWII-era celebrity gossip.
 
Rossellini. Italian, not Swedish. Sorry.
You might have heard of Isabella Rossellini. You might even have seen her in something.
@derobert I think I must have read a biography of Ingrid Bergman at some point.
@derobert Show business gossip.
 
@FaheemMitha Checking Wikipedia, I don't think I've seen anything she's been in. At least from a quick glance at the list...
 
@derobert Isabella Rossellini?
 
7:29 PM
yeah
 
She was in "Blue Velvet".
Actually, that might have been the only thing I've seen her in.
 
@FaheemMitha Haven't seen it.
 
I was very impressed with that film at the time.
@derobert ok
Actually, it's weird - Rossellini has some of her mother's mannerisms, though they don't look that similar.
 
Wait! I checked the TV section. I've probably seen "Mom and Pop Art", an episode of the Simpsons, she voiced someone in!
 
I'd say it's quite unusual.
@derobert Probably?
 
7:32 PM
Well, there are a lot of episodes of the Simpsons... hard to recall them all. But I think I was still watching season 10.
 
@derobert I'm surprised. Haven't you tired of it yet?
 
@FaheemMitha Well, at some point I stopped watching it. Not sure exactly what season. I mean, I'd be sure I saw it if it were season 7. And if it were 15, sure I didn't...
 
And random aside - Rossellini's daughter is practically the definition of privileged - just look at her Wikipedia page - en.wikipedia.org/wiki/Elettra_Rossellini_Wiedemann
I'd never heard of her till this moment, so that might be a snap judgement.
@derobert One can only watch so much TV.
 
@FaheemMitha Indeed.
And Simpsons stopped being good after a while. Hopefully South Park manages to do a good season this year, or I feel they may be done...
 
@derobert I always thought that show was horrible. I've never watched any of it.
 

« first day (2721 days earlier)      last day (2248 days later) »