Recent Questions - Unix & Linux Stack Exchange |
- Making Bash send this error to std error
- Bash: command substitution with background job
- Packages with broken dependencies
- apt-get update error in termux
- mount: /: mount point not mounted or bad option (fresh Gentoo installation)
- Xilinx onload | SFC (Failed to allocate EVQ DMA buffer)
- Internal display gets bypassed when X is started, startx
- NetworkManager not handling connections
- How do I write a script that creates symbolic links of files found inside folders in source directory to another directory
- export variables in for loop
- Modify a string literal in ELF x86_64 file
- Install MDTAP on Rhel8 but it failed
- gpg2 -- get fingerprint using script
- join two text file in bash that is separated by comma
- Is there really no way to set socks or proxy in Xfce as simply as in Gnome?
- Rename file by removing repetitive substrings contained in filenames
- Finding specific PNG images and renaming them
- Crazy clock drift on ancient VM
- Need to enable gd for an older version of PHP
- Automate locale changes on Linux
- Linux, add to sudoers file programmatically
- "gpg: error reading key: No public key" when updating manjaro-keyring
- Sorting ls output respecting locale but not ignoring nonalphanumeric characters
- Shift of dates in a CSV file via bash script
- Is there a method to indicate the last occurrence a loop over lines of an input file?
- Cannot Schedule Audio Volume Change with Cron (tried direct in cron, python, etc...)
- Is there anyway to see my REAL DNS server
- Changing default desktop environment
- How to install glibc version that corresponds to GCC 4.4 on RHEL5
| Making Bash send this error to std error Posted: 14 Oct 2021 10:46 AM PDT While writing some Lua as a backend for my LuaTeX code I noticed the following. For background, here is the Lua code. This version is standard Lua. But you don't really need to understand Lua to understand what the function is doing. I needed a function that would return both standard output and error to Lua, and hence to TeX. Since Lua doesn't have a library function that does this, I had to roll one myself. This version writes standard output to a file, and redirects standard error to standard output. Then it reads them both and returns them. This isn't particularly pretty, but better alternatives are not obvious. Today, while in a state of momentary confusion, I wrote the following code as the argument So this command gets passed to the shell: for some suitable temporary file. This gives the error, if typed directly on the shell (and forgetting about the Lua, which has served its explanatory purpose)
But the interesting thing about this is that this error doesn't appear to go to standard output. At least, the above command does not collect it, and I wasn't able to collect it any other way. So, in the interests of bullet-proofing my Lua function, here are my questions.
|
| Bash: command substitution with background job Posted: 14 Oct 2021 10:43 AM PDT I'm trying to fire and forget a process within a function in bash. I'd this function to return a status corresponding to the fact the process has indeed been fired and retrieve output of the function to get the PID of the sub-process. So I wrote that: When calling it with command substitution, the function blocks and never returns (it does not block outside of command substitution) I don't get why the function blocks in that situation, I tried various approach (setsid, disown etc...) unsuccessfully but I just don't quite grasp what is happening. Any pointer to understand this situation? |
| Packages with broken dependencies Posted: 14 Oct 2021 09:37 AM PDT I am unable to install any debian packages because gdebi complains about packages with broken dependencies. Then I ran pkexec synaptic and found the culprits. Packages libicu_dev, libicu60 and libicu60:386 have broken dependencies. How can I fix it? dpkg doesn't even recognize they are installed. How to fix these broken dependencies? Any clues? |
| apt-get update error in termux Posted: 14 Oct 2021 09:27 AM PDT Get:1 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease [4009 B] Err:1 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF Get:2 http://ftp.harukasan.org/kali kali-rolling InRelease [30.6 kB] Err:2 http://ftp.harukasan.org/kali kali-rolling InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository devel@kali.org Reading package lists... Done W: GPG error: https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF E: The repository 'https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ftp.harukasan.org/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository devel@kali.org E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. |
| mount: /: mount point not mounted or bad option (fresh Gentoo installation) Posted: 14 Oct 2021 09:17 AM PDT Just rebooted gentoo install from livecd, and it seems like nothing is writable. On boot I get this error as it tries to remount the root filesystem read/write: My wifi interface also failed to start, but I think I know how to fix it... If the root filesystem worked. Also here is my /etc/fstab: So far I've tried to unmount dev/nvme0n1p6 and remount it as write, but it always gives me /dev/nvme0n1p6 already mounted to /. Any help is appreciated. |
| Xilinx onload | SFC (Failed to allocate EVQ DMA buffer) Posted: 14 Oct 2021 09:16 AM PDT I am trying to use the Xilinx onload high performance user-level network stack however I am running into issues. The onload SFC driver is loaded: Running sfnt-pingpong within onload wrapper results in failure to allocate EVQ DMA buffer Message printed to term on execution: Messages in syslog/dmesg: |
| Internal display gets bypassed when X is started, startx Posted: 14 Oct 2021 10:55 AM PDT I'm running CentOS Linux release 8.4.2105, kernel: 4.18.0-305.19.1.el8_4.x86_64. The Dell I'm using has built in Intel graphics, and an NVIDIA Quadro M1000M GPU, running with kmod-nvidia-470.74-1.el8_4.elrepo.x86_64. Machine is a Dell precision 7510 with Xeon E3-1505M I recently ran dnf update....[smile vanishes] It would appear that the Intel graphics controller is just...gone. So a separate issue, but necessary for explanation, X never started automatically after I installed the Nvidia driver. I would boot up and drop into a terminal, log in, and have to manually execute: startx to get the desktop environment to come up; slight inconvenience but I really didn't care. Anyway, same procedure, on boot I drop into a terminal as usual and this comes up on my laptop's internal display; the LCD, but when I: startx, I only get video on the external display, e.g., HDMI. output from lspci: Where is Intel VGA controller? Even more troubling in the BIOS, under system information, I see: I have my Xorg.0.log and dmesg, but am not positive at the moment on how to attach these (first post here...), will figure this out and up load soon. Things I have tried to restore the internal monitor: so far nothing has worked and I am out of ideas. UPDATE: |
| NetworkManager not handling connections Posted: 14 Oct 2021 08:50 AM PDT I am facing a problem where although I am connected to the network I cannot find any connections on my NM applet. I added a VPN configuration also there and whenever I try to log into it i get a prompt that says
My I have tried re-installing all the network manager packages and I had no luck with making my connections appear... Here is the output of the Here is the output of the I tried managing the device by: Lastly, here are the contents of |
| Posted: 14 Oct 2021 09:56 AM PDT I'm fairly new to Linux and I have used batch files to do batch tasks easily. I have this script that scans the folders found inside the source folder and then creates a symbolic link off each compressed ZIP archive found inside to the destination folder. What the script does is that it goes out of the current directory twice, enters a folder called projects, then another folder called example inside and finally into a folder called release. Within the release folder are a bunch of other folders (i.e version 1, version 2, version 3, etc.) and inside these folders is a .zip file. The next part of the script is that it goes through the folders version 1, version 2, version 3, etc. and then creates a symbolic file of the .zip file found inside to the destination folder. This for loop continues on until there are no remaining .zip files to create a symbolic link of. The script looks like this, there are comments left as a guideline: The directory structure and contents looks about like this: How would I go about to converting this to a Shell script? I know not every feature in a Windows batch script isn't available in BASH and that's okay because I can omit some parts of the script. Thank you in advance. |
| Posted: 14 Oct 2021 08:31 AM PDT I have a terraform project with a terraform.tfvars file where I use these variables: In some other parts of the project, I use environment variables like this: Hence, when I have to export these variables if I change them. After exporting, I do I want to automate running this project such that I can run it for more than one customer credentials by automatically changing & exporting the variables and then running the terraform commands. Is it possible via a shell script or something similar? |
| Modify a string literal in ELF x86_64 file Posted: 14 Oct 2021 10:06 AM PDT I have a ELF x86_64 (basically an executable file) and I'd like to replace a string literal within the file (without corrupting the executable file however)... and I should do that programmatically using a Linux bash/sh script... Which is the simplest approach? I've read somewhere that Thanks. |
| Install MDTAP on Rhel8 but it failed Posted: 14 Oct 2021 08:05 AM PDT
I came to the passage: yum install mdatp I tried to disable the repository of kubernetes on /etc/yum.repos.d/kubernetes.repo. Relaunched the command "yum install mdatp" and I get this: With the command: If I install the package libatomic from this link libatomic and the package mdatp from this link mdatp, do I destroy the machine?? 😱 How can I manage to install the mdtap command? Thanks and good evening! |
| gpg2 -- get fingerprint using script Posted: 14 Oct 2021 08:12 AM PDT I am attempting to extract the fingerprint from a GPG2 key. The fingerprint will then be passed to In the example below I want the fingerprint value When using if I omit Is there another way I can accomplish this? The end goal is to setup |
| join two text file in bash that is separated by comma Posted: 14 Oct 2021 10:14 AM PDT file 1: file 2 output So far, I have it works if file 1 and 2 is separated by only space without "," but when I put the comma in the file it outputs blanks. |
| Is there really no way to set socks or proxy in Xfce as simply as in Gnome? Posted: 14 Oct 2021 07:45 AM PDT I've been reading some articles on how to set an HTTP proxy or a socks server with Xfce, and one of the solutions was to add some lines to I was surprised that up until now there seemingly is no tool for easy global proxy/socks server setting without using either Gnome or KDE. Is this really true? |
| Rename file by removing repetitive substrings contained in filenames Posted: 14 Oct 2021 09:18 AM PDT I need to rename a bunch of files with the following pattern: to Each filename only contains one type of substring out of 4 possibilities - Note that the substring I am out of my wits and the closest thing I can find is this question on Stack Overflow. However, based on my limited knowledge in string manipulation, I would love to have more help!!! |
| Finding specific PNG images and renaming them Posted: 14 Oct 2021 08:00 AM PDT I have to find multiple files named I already have the beginning, finding the file (each This is what I have for finding the files: |
| Crazy clock drift on ancient VM Posted: 14 Oct 2021 09:12 AM PDT I am stuck with a Centos 5.3 VM (running on Proxmox) which exhibits huge clock drift. It was configured to run ntpdate every 5 minutes but the clock was still getting out of sync by up to 20 seconds between executions. I've tried running ntpd (and stopping the cron job) but its not reporting any errors / I can't see an ntp.drift file getting created anywhere and the clock is continuing to drift. I'm running approximately 30 VMs and the same number of containers on the cluster - nothing else exhibits the same issue. Apart from the server address there is not other configuration in /etc/ntp.conf |
| Need to enable gd for an older version of PHP Posted: 14 Oct 2021 09:46 AM PDT The PHP version is 5.6, so quite old. Using I can locate these To enable I'm guessing I'll need an alias Is there a step-by-step guide on manually setting this up? |
| Automate locale changes on Linux Posted: 14 Oct 2021 08:42 AM PDT I'm finding it quite tricky to programmatically change |
| Linux, add to sudoers file programmatically Posted: 14 Oct 2021 10:41 AM PDT What is the correct way to update the
|
| "gpg: error reading key: No public key" when updating manjaro-keyring Posted: 14 Oct 2021 10:46 AM PDT I have a super weird issue which has almost been preventing me from installing/updating anything. Anytime pacman tries to update the I'm running gnupg 2.2.29-1 and I've made sure to stay on the I've visited Manjaro's help site and every Manjaro forum page that even mentions GPG. Suggestions from there unfortunately did nothing to help. To be specific, on step 4: When it tries to append manjaro.gpg keys, I get the "No public key" error twice in a row, then the rest seems to continue normally. I tried continuing anyway, but when I re-enable key checking and run |
| Sorting ls output respecting locale but not ignoring nonalphanumeric characters Posted: 14 Oct 2021 10:52 AM PDT Let's say I have a directory with the files Currently, Is there any way to achieve this goal? Note that I also care about other characters than underscore, ie I would like The following are not the answers I am looking for:
|
| Shift of dates in a CSV file via bash script Posted: 14 Oct 2021 09:32 AM PDT Currently I have a file with records like this : Assuming that the current date is In the example shared above, transformation should be done on rows 2 to 5. |
| Is there a method to indicate the last occurrence a loop over lines of an input file? Posted: 14 Oct 2021 08:05 AM PDT Suppose I have a file and using a loop and So in other words I want to do something different with the last line in the script. |
| Cannot Schedule Audio Volume Change with Cron (tried direct in cron, python, etc...) Posted: 14 Oct 2021 08:37 AM PDT I posted this in Raspberry Pi, but was told that it was better suited in a general linux or programming area. So I figured I'd ask here now... I am putting together a kiosk that should play video. I'm using a NUC with Raspberry Pi Desktop. Everything works but automating the audio with Cron. I work in a school and blasting sound during the day would kind of suck, so I want it to change based on the time of the day. When run from terminal the following code works: and So, I put it into Cron: and Nothing. Fine. So I make a really simple python script to run (yes, I realize I put it in a system folder, I was planning on moving it, it just kind of ended up there.) I make it executable: Then I call it from the terminal with both: and Again, it works. Yay. Into Cron it goes. Neither: nor Not even Nothing works. So begins the actual troubleshooting. I check the syslog. Everything runs, but I learn that when I run it as a Still nothing. So I try running it as a sudoer but with the user beforehand. Nothing again. Please help me. I just want to adjust the volume automatically without logging into ssh for every NUC we're putting up three times a day until I quit or retire. Thank you! |
| Is there anyway to see my REAL DNS server Posted: 14 Oct 2021 10:36 AM PDT Is there anyway to see my REAL DNS server? and I'm not referring to 127.0.0.53 or the router (192.168.0.1), but the real external server in bash? I'm talking about the ISP DNS, or VPN DNS servers... |
| Changing default desktop environment Posted: 14 Oct 2021 09:05 AM PDT I'm on Fedora 20 and I want to change the default desktop environment from Gnome3 to Gnome classic. I want to do this with the terminal because I can't access the dropdown menu on the login screen (Once I select a user it logs straight in). I already installed it, all I have need to do now is switch from Gnome3 to Gnome Classic. |
| How to install glibc version that corresponds to GCC 4.4 on RHEL5 Posted: 14 Oct 2021 10:07 AM PDT We have a program with executables built on RHEL6 using GCC4.4 and we need to run it on RHEL5.5. But RHEL5.5, by default does not have the necessary version of glibc. Has anyone faced such an issue and possibly recommend how to install their libraries in this particular case? |
| You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States | |
No comments:
Post a Comment