Skip to main content

New answers tagged

5 votes
Accepted

How to POSIX-ly ignore "warning: command substitution: ignored null byte in input"?

If the question is how to ignore the warnings or errors that the shell outputs when you try to do something not supported such as here a command substitution with a command that outputs NULs in the ...
Stéphane Chazelas's user avatar
2 votes

How to POSIX-ly ignore "warning: command substitution: ignored null byte in input"?

The error message you are getting is from the shell.  To ignore/suppress it, you need to redirect stderr for the shell.  When you do rpi_model_name=$(cat /sys/firmware/devicetree/base/model 2>/dev/...
G-Man Says 'Reinstate Monica''s user avatar
8 votes

How to POSIX-ly ignore "warning: command substitution: ignored null byte in input"?

Ignoring or explicitly deleting an unknown number of zero bytes without understanding where they come from seems like a bad idea! So, let's actually look at where that comes from and in which cases we ...
Marcus Müller's user avatar
2 votes

How to POSIX-ly ignore "warning: command substitution: ignored null byte in input"?

This worked for me on Raspberry Pi 4 with Debian 12 Bookworm, and it should be a portable solution (adhering to POSIX). We can translate all of the NULL characters with an empty string, effectively ...
Vlastimil Burián's user avatar
0 votes

Sending files via Bluetooth using command line

In order to autolaunch D-Bus without a connected display, you need to set the DISPLAY environmental variable. Easiest way to do that is just export DISPLAY=:0.0. After that there might be an issue ...
bluevulture's user avatar
0 votes

Ubuntu Server disk cloning + saving on another disk in network

BACKUP: Assuming you have the free space or an external thumb drive plugged in, you can recreate an image file of the rpi disk and output that to an *.img.gz file. sudo apt-get install gzip -y ...
Michael Zietlow's user avatar
1 vote

Ubuntu Server disk cloning + saving on another disk in network

What is the best way of creating a backup? While this site doesn't recommend software, I'm adding the following link due to it being pretty much the de facto standard for Linux image cloning and ...
eyoung100's user avatar
  • 6,755
0 votes

How to disable rfkill after it has been uninstalled from Raspbian

Even it's a old question, here is my dirty solution for Pi Zero 2W & 2024-03-12-raspios-bullseye-armhf-lite: Mount somewhere the SD /rootfs partition, I use Paragon to mount it on Windows but I ...
yo3hcv's user avatar
  • 101
0 votes

How to monitor multiple USB UPS with Network UPS Tools

Jumping in a few years later as I had a similar issue. Running nut 2.8.0. First, note that with the usbhid-ups driver, the port should be set to auto (as in SomebodySysop's answer). Second, note that ...
IvoryNomad's user avatar
2 votes
Accepted

Pi Zero Cross Compilation Floating Point Specification

GOARM is expected in the environment; the Makefile has no provision for that, but export GOARM=5 before the build should do the trick. Failing that, run GOOS=linux GOARCH=arm GOARM=5 go build "-...
Stephen Kitt's user avatar
3 votes
Accepted

Cannot set LC_* to default locale: No such file or directory

Considering the very last line of my question (Thanks Chris Davies for the pointer): /usr/sbin/dpkg-reconfigure: locales is not installed It was easy just to install the locales package, which I ...
Vlastimil Burián's user avatar
0 votes

Systemd fails to restart a Python script with exit(0)

I am providing the solution that worked out for me: My python script: test_python_script_auto_run_linux_raspberrypi.py from datetime import datetime import schedule import time def print_time_now(): ...
Mainland's user avatar
  • 105
0 votes

Redirect output to file but never create empty file

Yes, ifne is not sensitive to stdbuf because even though it is using stdio (whose buffering stdbuf is meant to adjust), it's not printing its data to stdout, but to a different FILE* resulting of ...
Stéphane Chazelas's user avatar

Top 50 recent answers are included