-
doug1
so this directory has three files: one named `a file`, a second named `another file`, and a third named just `files` that showed up after i did `ls > files`
-
doug1
i'm trying to get `grep someterm $(cat files)` to work like i want
-
doug1
i.e. search `a file` and `another file` for someterm
-
parv
Do you want to search files for a term & list of files is another file?
-
parv
If so, what you showed, should work
-
parv
Or you could recursive search via "-r" option: grep -r regex <directory>
-
doug
i get errors: `grep: a: No such file or directory\ngrep: file: No such file or directory\ngrep: another: No such file or directory\ngrep: file: No such file or directory`
-
parv
Could you show your files & their parent directories; the directory where you create the file list; and the directory in which you run "grep"? I am thinking that you are either having path issues or are spitting out file contents instead of a file list
-
doug
-
VimDiesel
Title: gist:fa2deefe25fcb6c87261b192bc80ff88 · GitHub
-
doug
that oughta contain all the vital bits
-
parv
Ah I see, spaces in the file name which are causing the issue
-
parv
Try this: while read file ; do grep term "$file" ; done < list
-
doug
unfortunately, that doesn't show which file `term` was found in
-
doug
i'm really hoping there's a way to avoid explicit iteration
-
parv
Slap a /dev/null after the file name: ... ; grep term "$file" /dev/null ; ...
-
parv
My preferred way is to use "find | xrags grep" or just "grep -r" instead of creating a file list (if I can help it)
-
parv
With "find | xargs grep" : find <directory or file paths> -type f -print0 | xargs -0 grep term
-
parv
With "grep -r" : grep -r term directory
-
doug
whoops, i messed up the problem definition: i'm actually trying to find files without that term
-
parv
grep may not help by itself. Love to be corrected.
-
parv
find directory -type f | while read path ; do grep term "$path" || printf "%s\n" "$path"; done
-
doug
yeah, `while read file; do grep -q someterm $file || echo $file; done < files` works well enough
-
parv
Corrected: use "-L" option of "grep".
-
doug
well sure, i would like to avoid iteration
-
parv
... then can avoid "|| echo" part
-
doug
mangling IFS any which way doesn't seem to give me a workable result
-
parv
Someone or something has to iterate, regardless of you would see it or not
-
doug
well sure i just meant explicitly specified
-
parv
Yeah, "grep -r ..."
-
doug
sure, tho in my particular use case there are a bunch of unrelated files in the same dir. that's why i'm using a file fulla filenames.
-
parv
Well, then. Could use "find" in ("find ... -print0 | xargs -0 grep") to match some file pattern or not (including complete names). Or, do the explicit "while loop" with file names from a list
-
doug
i really just want to find a general way to interpret a file full of names with spaces in them as individual files. plenty of times in the past that coulda come in handy.
-
doug
iterable forms i've no problem figuring out
-
parv
find ... -print0 | xargs -0 ..."
-
parv
Instead of a shell, use Python, Perl etc
-
doug
yeah, also easy solutions.
-
parv
Then you would only need to worry abut shell splitting file names on a space
-
doug
and what i generally end up doing
-
doug
i guess i really want to force the shell into a specific manner of interpretation
-
parv
Zsh behaves if one helps: ls x\ * # lists all the files that start with "x" followed by a space
-
doug
sorry, didn't mean to try and trick you into solving an unrelated problem
-
parv
No worries
-
parv
Zsh also includes the "escaping \" during file name completion
-
mictty
hmm
-
parv
Yehuuup
-
mictty
hello
-
mictty
is there difference between freebsd libc from openbsd libc?
-
parv
I would think substituting one for the other would not work
-
mictty
that is to say, can i just leave some openbsd configuration and alias to freebsd?
-
mictty
please don't breaak
-
mictty
yeah
-
mictty
is there any one line command for system info for such as testing report?
-
parv
What are you looking for?
-
mictty
making note for my test info in case of discussion?
-
parv
My shell script that collects various output in one directory:
termbin.com/7v9h3
-
mictty
sh user based
-
parv
That is
-
mictty
you don't put help logic?
-
mictty
is your brain non-volatile permanent memory?
-
mictty
comment...
-
mage
I've to upgrade a CARP-based router/firewall. I've already upgraded the BACKUP node and I was wondering what's the fastest way to switch CARP status? is it enough to raise advskew on one interface on the MASTER node (if preempt=1) ?
-
parv
mictty, I wrote it for own use to collect different data/files; nothing more.
-
mictty
parv: no echo based
-
parv
mictty, What do you mean by "echo based"?
-
mictty
parv: printf+\n
-
parv
Ok I have no idea anymore what you are looking for
-
mictty
parv: I am appreciating
-
mictty
parv: i will name parvesting/parvest
-
mictty
thank you parv
-
parv
Aye
-
parv
Note that you may get permission errors for some commands if run as non-root
-
V_PauAmma_V
mage, I don't know much about CARP so take that with a grain of salt, but one way could be to disable the CARP interface alias on the master. Or
docs.freebsd.org/en/books/handbook/advanced-networking/#carp-10x (the command at the end of that section) to switch master and backup temporarily.
-
VimDiesel
Title: Chapter 33. Advanced Networking | FreeBSD Documentation Portal
-
meena
-
VimDiesel
Title: cloud-init/__init__.py at main · canonical/cloud-init · GitHub
-
meena
I was gonna ask: does anyone know what the equivalent of Linux' /sys/class/net/<devname>/device/features is on FreeBSD? instead i have to ask: wtf is /sys/class/net/<devname>/device/features on Linux?
-
mictty
-
VimDiesel
Title: freebsd/stdlib.h at master · lattera/freebsd · GitHub
-
mictty
this kinda comment makes me laugh when i am reading code
-
mage
V_PauAmma_V: I raised the advskew to 254, worked
-
mictty
whos cute here
-
» meena checks mirror
-
meena
mictty: I'm alright
-
mictty
lol
-
meena
another one of those days where i haven't had time to look into the mirror until noon
-
» V_PauAmma_V is crabby, not cute. :-)
-
» V_PauAmma_V nods at mage.
-
mage
what's the status of ALTQ on FreeBSD? is it production ready?
-
V_PauAmma_V
It's been here since 5.3. I would be surprised if it weren't.
-
kp
It's not enabled by default and doesn't work with all hardware. Unless you have very good reason to want altq look at dummynet instead.
-
kp
(In 14) you can use dummynet with pf too.
-
mage
I haven't used dummynet yet, will take a look, thanks
-
mage
although it would be fantastic if PF could one day support the OpenBSD queue equivalent (aka ALTQ successor)
-
meka
I doubt that will happen, with dummynet already implemented
-
mage
in fact what I'd like to do is to bandwidth limit some VPN clients (wireguard) and pf is already used
-
mage
kp: is it possible to "use" pf with dummynet on 12 and/or 13 ?
-
kp
No
-
meka
Well, 14 is "just 'round the corner":
freebsd.org/releases/14.0R/schedule
-
VimDiesel
Title: FreeBSD 14.0 Release Process | The FreeBSD Project
-
kp
re@ is having a bit of a busy time.
-
kp
They're just done with 12.4, will start on 13.2 soon and when they're done with that it's 14.0
-
kp
There's a number of shiny things coming in 14. OpenVPN DCO, pf dummynet and ethernet support in pf.
-
mage
good to hear that!
-
mage
and.. (finally) if_wg
-
meka
kp: what is ethernet support in pf? Layer 2?
-
kp
Yeah.
-
meka
Ah, just remembered, I saw it in quarterly report. Thank you!
-
kp
Pretty basic, but you can tag packets based on MAC address, or send them into dummynet limiters.
-
kp
It's there because of pfsense's captive portal. That needs to look at the mac address, and used to use ipfw for that. Now pfsense is pf exclusively.
-
kp
Mind you, OpenVPN DCO is also thanks to pfsense.
-
kp
Netgate. Rubicon, whatever.
-
mage
where can I find the "2021q2 pf_ethernet report" ?
-
meka
As a (ab)user of OpenVPN, it is really nice news for me
-
kp
-
VimDiesel
Title: FreeBSD Quarterly Status Report Second Quarter 2022 | The FreeBSD Project
-
kp
-
VimDiesel
Title: FreeBSD Quarterly Status Report 2nd Quarter 2021 | The FreeBSD Project
-
kp
-
VimDiesel
Title: FreeBSD Quarterly Status Report 2nd Quarter 2021 | The FreeBSD Project
-
mage
thanks
-
BarnabasDK
I have an old HP server with 4xOpteron CPUs in it - the kernel I just upgraded to seems to only detect apic 0 - so only one core as opposed to earlier kernels.
-
BarnabasDK
-
VimDiesel
Title: CPU-Info - Pastebin.com
-
BarnabasDK
anyone know what has changed lately with apic and apic detection?
-
yo9fah
yayyy
-
yo9fah
I lovely freebsd!!! :D
-
V_PauAmma_V
BarnabasDK, can you pastebin /var/run/dmesg.boot for the server that's missing CPUs?
-
deever
hi
-
la_mettrie
hi
-
deever
i have upgraded the pool on a FreeBSD 13.1 system and now can no longer boot from it:
pastebin.com/4bcz1hG2
-
VimDiesel
Title: cannot boot from zpool supporting encryption - Pastebin.com
-
deever
how can i solve this? there is only some encrypted snapshot received from my ubuntu 22.04 on it, everything else is unencrypted...
-
meena
deever: EFI?
-
rwp
deever, First let me say "I think" here. I think you need to read man zpool-features in order to understand what is happening. Then boot a live system and inspect the pool for the feature mismatch.
-
rwp
Since the boot system is rejecting the pool due to it having unsupported features you will need to boot a system which supports those features.
-
rwp
It seems impossible though that a "zpool upgrade" would upgrade the pool beyond what the current system supported.
-
rwp
Might that have been done on a different newer system than what you are booting?
-
msiism
So, what's a good (GUI) e-mail client on FreeBSD? I'm using Claws Mail on Linux, which is nice, except for some major quirks.
-
Helper
evolution is nice
-
Helper
or thunderbird
-
Helper
FreeBSd also has claws-mail
-
msiism
I've actually abandoned Thunderbrid in favor of Claws.
-
Helper
type pkg search claws and then pkg install package
-
rwp
-
VimDiesel
Title: Comparison of email clients - Wikipedia
-
rwp
I use mutt in a text terminal (plus firefox if needed) myself so no help here.
-
rwp
I support a friend's email with RoundCube which is a webmail platform. Been told I should look at Mailpile too. But those would be heavy admin setups.
-
msiism
Oka,y I'm probably just go with Claws then.
-
Helper
ok
-
rwp
I have heard good things about sylpheed and that is in ports.
-
yuripv
thunderbird > * (if only they would remove the "chat" and add proper exchange calendar/contacts without using addons)
-
msiism
More often then not, I can't even type anything in Thunderbird because it's downloading messages…
-
msiism
Also, the address book implementation is somewhat off.
-
msiism
Oh, and it uses way too much RAM, too.
-
Helper
true.
-
souji
msiism: yeah the RAM usage is wayyy too much
-
Helper
evolution is nicer
-
msiism
I actually have half a mind on trying out KDE Plasma and whatever mail client comes with that.
-
souji
I think its called KMail or so
-
msiism
Oh right.
-
souji
iirc it was not bad, but some options where kinda confusing.
-
souji
The only thing that keeps me from the KDE tools are the dependencies... that are so many if you do not use KDE
-
msiism
Yeah. But there's a "Qt-only" version of Falkon in packages, for example.
-
msiism
I've already installed that.
-
meena
we need a better way to configure pointopoint routes in FreeBSD:
gist.github.com/642efb4e0f4da255382bc299ec65ce83
-
VimDiesel
Title: rc.conf · GitHub
-
msiism
By the way, why is it that I have to configure the X cursor theme in two places to make it work throughout?
-
souji
msiism: Ok, I never used Falkon, is it any good?
-
msiism
Yeah, Falkon is pretty neat. I mean, you can't really manage JS in a meaninful way, but I just usally switch it off.
-
souji
Hmm, I might try it some time this weekend.
-
msiism
Okay, got Claws Mail working.
-
pmnw
Does anybody know why some zathura plugins (mupdf, epub) disappeared from the ports collection?
-
otis
pmnw: zathura-pdf-mupdf is in ports
-
pmnw
otis: wait, you're right. I don't know why I thought it was missing. I swear I didn't imagine it. No problem then.
-
msiism
That redglass X cursor theme is really neat, by the way.