Recent Questions - Unix & Linux Stack Exchange |
- Use For loop to extract certain columns from a series of files to write new tab-delimited files
- Resource for Linux Graphics
- Update delimiter of specific columns
- Network bandwidth aggregation
- How does the this wildcard work "* .*"
- Why Linux has "bridge" link type, and not a "switch"
- I want to join two files and KEEP all the white space
- sudo: sorry, you are not allowed to set the following environment variables: PATH
- Pass the variable value to curl JSON
- Best way to create splash screen from kernel boot to Xorg JavaFX app?
- Is there any better tool than nft to print ordered rules?
- Unable to install Manjaro
- Ansible - matching a string to an item in a list
- How to check if command had any output (zsh)
- random output from input
- Install a second G++ on Debian using official packages only?
- bash script pattern not found
- Extract only rows with duplicated strings in tab-delimited table
- Sending HTML with Mutt mangles the reply history badly; How can I make replies survive a call to Pandoc?
- Zoom - Problems with sound in Ubuntu
- Asus PN50 mini-PC: There are no pwm-capable sensor modules installed
- How do I switch <Ctrl+C> from interrupt to copy, and <Ctrl+Shift+V> to <Ctrl+V>, in xfce4-terminal?
- Python open screen and execute inside screen
- Joe 4.6: How do I override color definitions?
- Create an image of the partition (only the used space)
- Why is vim frozen?
- IBM V7000 scripts for monitoring
- Applying changes to xorg.conf without restarting
Use For loop to extract certain columns from a series of files to write new tab-delimited files Posted: 05 May 2021 09:57 AM PDT I have a series of files located in a series of folder, for example: What I want to do is to extract the 1st and 5th column from each of the *.tsv file and create a new tab delimited file in the corresponding folder. That I can do separately for each file under its corresponding folder by using the commands below: My question is, because I have over a hundred of this kind of file, is there a way to write a FOR loop to do this step at the terminal automatically? The naming convention for the folder and files are as follows:"BR(2~5)_(1~6)-(n, as the number of files contained in the folder)" for the folders; "bin.n.(strict/permissive/orig).tsv" for the files. Thank you in advance and all suggestions are welcomed! |
Posted: 05 May 2021 09:56 AM PDT Most distros include a 'usable' graphics stack out of the box. But graphics on linux is wildly inferior to Windows. Setting up hardware acceleration for a browser can take an entire week. I still don't have hardware acceleration on Pop_Os! Even though it's by far the best out of the box hybrid graphics experience I've used. Is there a collective resource for Linux graphics issues? Can we develop a site dedicated to troubleshooting and helping with easy fixes to common graphics problems? Can we develop a tool to reliably detect (and in OEM's cases, fix) graphics issues during the boot process? Can we develop a universal config file somewhere (/etc/graphics-stack.cfg) to let us decide what we want and let a tool make sure it's available? I'm using Pop_Os! As a daily driver. I'd recommend it to my team to use for development work if I didn't spend the last 2 weeks debugging obscure hardware acceleration bugs(yes. It is a bug. Windows can do it first try and we can't) not to mention driver and xorg->wayland issues on Ubuntu and Arch too. |
Update delimiter of specific columns Posted: 05 May 2021 10:00 AM PDT I have a comma-separated file with 7 fields. One of these fields, however, contains File I have: Required Output: I have tried multiple solutions but have not been able to achieve what I am looking for. I tried the following command which only updates the delimiter of the first 4 columns: The approach I'm looking for is to update the delimiter of the first 4 columns and last 2 columns. In this way I can have the file with updated delimiter without changing the Address column. I have come up with the following piece of code but this removes the |
Posted: 05 May 2021 09:24 AM PDT Lets say I have access to two different networks: A and B. My device has two different network interfaces N1 and N2. A has a bandwidth of 5 mbps B has a bandwidth of 3 mbps I want to combine these two Networks to get a total bandwidth of: 8 Mbps. The way I was thinking of doing it as follows: I use the two network Interfaces(N1, N2) to connect to the networks A, B. Lets say I have hundred packets to send. I send 50 packets using network A and 50 using network B. I send these packets to a personal server where packets coming from network A and B are combined and are sent to the intended location. In order to do all this I think I will have to get all traffic from the network layer and send it to different interfaces. Assuming everything I just mentioned is doable, I want to know how can I intercept the packets coming from the internet layer so that I can implement the above logic and channel the traffic to different interfaces. |
How does the this wildcard work "* .*" Posted: 05 May 2021 09:34 AM PDT Here are the outputs. Why does the second command include the files if they have no space character before the period? Thank you for the help much love! |
Why Linux has "bridge" link type, and not a "switch" Posted: 05 May 2021 09:22 AM PDT In Linux, we can have a virtual bridge device. It is used i.e. by Docker, which creates a default "docker0" bridge. Since in networking bridge is a similar device to a switch (and switch is actually superior and used nowadays instead of bridges), I wonder, why is the link type called "bridge", and not "switch"? |
I want to join two files and KEEP all the white space Posted: 05 May 2021 08:54 AM PDT I am trying to join two data files. The first one has 100.000 records where each line represents one person. The second file has 400.000 records where a person in the first file can appear multiple times. The first column in both files has a unique ID of each person I want to join the files by the first column and add information from file 1 to file 2... so the new file will have 400.000 lines with added information about each person from datafile1. I tried using a very simple: But because column 3 in data2 is either 1, 2 or 3 letters and because there is not information in all all columns the output file does not look like I want it to look like. I want to KEEP the white spaces between all the columns and I want the columns to line up! Data 1: Data 2: The data I want : The Data I get: |
sudo: sorry, you are not allowed to set the following environment variables: PATH Posted: 05 May 2021 08:44 AM PDT I set an alias for sudo as: I checked that this works well by running However, I encounter an error when running
I could find a workaround by running I referred to https://www.sudo.ws/man/1.8.28/sudoers.man.html#Denied_command_log_entries but couldn't get the reason.
Why is PATH denied by sudoers? Any link or comment appreciated. |
Pass the variable value to curl JSON Posted: 05 May 2021 08:29 AM PDT I am trying to create a JIRA ticket using curl POST method, but the variable substitution is not happening properly in Below is my code where only |
Best way to create splash screen from kernel boot to Xorg JavaFX app? Posted: 05 May 2021 08:11 AM PDT ContextI work on Raspberry pi 4 with Yocto OS. I try to create a splash screen who appears after kernel boot and disappears when my JavaFx app is ready on Xfce4. I found several "solutions" but they do not suit me. My bad solutionMy actual solution is that I run a script at the boot (after kernel) who write directly on framebuffer my splash screen image. When Xorg start, I use When Xfce4 start, I set the Xfce4 desktop background with the same image and I wait that my JavaFx app start. My problemThis solution has a main problem, between each transition (boot-->xorg-->xfce4), I have a black screen. It's not a fluid boot. My dreamI thought that, it will be perfect to prepare Xorg + xfce4 + JavaFx boot in fake screen and display the splash screen on the real screen. When my Javafx app is fully started, I display my fake screen on the real. I don't found how to realize this solution, and maybe it's the worth solution. Can you help me please ? Thank you in advance. |
Is there any better tool than nft to print ordered rules? Posted: 05 May 2021 08:04 AM PDT I hate the way
|
Posted: 05 May 2021 09:26 AM PDT I had installed Manjaro gnome and xfce. At first, I tried with After pressing any key I got following message. I had made my USB bootable using Power ISO and Rufus(At first I tried by Power ISO, I noticed I was getting above error using Power ISO that's why I tried Rufus. Although I am having same issue) in Windows. Here's my Manjaro bootable USB image. |
Ansible - matching a string to an item in a list Posted: 05 May 2021 09:38 AM PDT I'm trying to iterate over a list in Ansible and search for a string in each item in it, and then assigning the matched item to a variable. To be more specific, I'm pulling all MAC addresses on each node into a list and looking for a specific manufacturer prefix in each interface. The list is created from Ansible facts - I create it at the start of the play: And then add found facts into it: I then tried to iterate over that list - I tried using the I've also tried registering the prefix to a variable and using a conditional by replacing the above's Both of which fail to run or produce unwanted results. How would I go about finding a string in a list, and registering the result in a variable? I've looked around the internet and in documentation and could not figure it out - any help would be greatly appreciated. Thanks! |
How to check if command had any output (zsh) Posted: 05 May 2021 08:13 AM PDT I want to print a new line after a command if it had any output (I hope that this will make it more readable once my terminal starts scrolling). I found this: Which works, but obviously prints line after every command. And also this: And tried to modify it, but it "breaks" the output (and makes vim un-usable) even w/o my modificatons. |
Posted: 05 May 2021 08:44 AM PDT Related question : how to create a random output from users input I was thinking to take an input(only one argument) from user just like Just like above. And, I want to make millions of sample from that single input. I want to save those texts in a txt formatted file. How to do it? Suppose, I am giving my email address as an argument `Istiakshovon0@gmail.com`. So, now I want to make possible related password with this account. Some sample output given below : I want to create sample password every possible way as possible. I added awk tag cause, I noticed that lot of peoples were formatting texts using `awk`. I am not familiar with it(I am just a beginner Linux user). That's why I added it. |
Install a second G++ on Debian using official packages only? Posted: 05 May 2021 09:12 AM PDT I need a newer G++ for a project, but all tutorials will tell you to download the sources, compile them and "simply" install them then use it. Which is something I don't want since it's not very reproducible. However, Debian do have more recent packages in their repositories (bullseye, testing, unstable, etc) that I can keep and share. I know doing this will almost get me a FrankenDebian, but it's far better than going the sources way or any shady repository (some tutorials even suggest ppas for Debian...). I also want to keep Debian buster's G++, since a lot of things will surely use it and that avoiding such errors: would certainly prevent some headaches here. I also heard about setting alternatives and all, but I would need to install the right packages first. So here's my question: How do I install another G++ on Debian buster, without going the sources' way ? |
Posted: 05 May 2021 08:46 AM PDT I have the following script: It works but it has an issue, if there is no match for one of the patterns, I want to know which pattern did not match. I also tried with: But it has same issue. |
Extract only rows with duplicated strings in tab-delimited table Posted: 05 May 2021 08:33 AM PDT I have a long list of data with 10 tab delimited columns. First two columns are the IDs. I would like to retrieve rows of selected IDs. I started with renaming the selected IDs, so that each of them prepended with file: Desired output: I was using Not sure what is happening here. Any idea? Or is there any better approach with grep/awk/sed in this case? |
Posted: 05 May 2021 08:38 AM PDT In mutt, I'm trying to write formatted emails, but the pre-processing step that converts markdown to HTML is mangling the previous messages. I'm using this answer to convert my messages to HTML. In mutt, I can write a message literally like this: and it ends up formatted as you'd expect. A sees B's well-formatted html. Unfortunately, this mangles the reply thread, since markdown uses whitespace differently than the sender probably did. In addition the reply thread is rendered to white-space+text, rather than retaining markdown/html markup. To see this, if B replies using the Mutt/HTML/Markdown tricks, pandoc will interpret the quoted text strangely, and mangle the reply text. The result after B->A->B looks like (I had to edit a bit to remove emails and such, but the it's basically spot on) QuestionIs it possible (and how can I) edit in markdown, convert my message to HTML, and either attach prev replies unchanged, or (ideally) in-line previous replies unchanged. |
Zoom - Problems with sound in Ubuntu Posted: 05 May 2021 09:17 AM PDT I have some weird issues with Zoom in Ubuntu 20.04. Every time I join a meeting and select "Join with my Computer Audio", Zoom volume starts at 10%: The second problem is weirder. It happens when I am in a meeting created by a specific colleague of mine (and only him!): when someone enters or leaves the room, Zoom's volume falls to 0%. I must manually changing again. This doesn't happen with anyone else, nor does it happen to the other participants of the meeting. It's only me. I have Zoom 5.5.4 for Linux. Any ideas what might be the problem? Feels like a local issue. Some odd configuration. |
Asus PN50 mini-PC: There are no pwm-capable sensor modules installed Posted: 05 May 2021 09:49 AM PDT I am running Linux Mint on a PN50 Ryzen 5 4500U. Fan is very loud and I think it can make it quieter with a little bit of fan RPM control. However, I am not able to detect the fan speed: My The Any ideas how to add the fan sensor to the list of sensors? and CPU core temperature? |
How do I switch <Ctrl+C> from interrupt to copy, and <Ctrl+Shift+V> to <Ctrl+V>, in xfce4-terminal? Posted: 05 May 2021 09:09 AM PDT This is basically the same question as How to set ctrl+c to copy, ctrl+v to paste and ctrl+shift+c to kill process in xfce4-terminal?, but not a duplicate, because neither of the answers helped. Alex Kaszynski's answer suggests modifying the I did that: I have changed two lines: and but neither of those helped; the interrupt is still assigned to Ctrl+C. (I would probably need to make it unbind and rebind to Ctrl+Shift+C, but do not know how to do so.)
|
Python open screen and execute inside screen Posted: 05 May 2021 08:04 AM PDT I have a py script S1 that I would need to execute inside a screen. On an end-user point of view, I would like them to just execute another python script S2, which will open a screen and execute the script S1 inside that screen. My What I want is that end-users can simply run The reason |
Joe 4.6: How do I override color definitions? Posted: 05 May 2021 09:34 AM PDT After upgrading from Debian 9 (Joe 4.4) to Debian 10 (Joe 4.6), the following lines in my joerc started creating errors: I used this to override the default colour scheme, which has C pre-processor lines in dark blue, which is very difficult to read when using a terminal with black background. I am unable to find documentation on how to do this in 4.6, the entire section on colours has just disappeared from the default /etc/joerc. Any help would be appreciated. |
Create an image of the partition (only the used space) Posted: 05 May 2021 08:24 AM PDT I have a partition Now when I run a command using dd: I saw behavior that dd is making the image of 3.3 GB While I don't want the unallocated space to be the part of the OS image. So I tried different solutions. I found one solution: This solution created an image of 1.9 GB as I have defined a block size of 1M and count is 1946 which will give 1.9 GB totally.
|
Posted: 05 May 2021 09:32 AM PDT I have two different machines (home and work) running Ubuntu 18.04. Last night I was definitely multitasking and probably hit some other keys in there, but I don't know what keys. It was late, though, so I closed the terminal window and tried again (I was entering a git commit message). It happened again partway through my typing so I switched to I figured I was just tired, but then it happened to me today at work on a different laptop altogether. Again I was multitasking and can't swear I didn't type any bizarro key sequence but if I did it was accidental. And other tabs in the same terminal aren't frozen. I'm used to getting trapped in Per a comment suggestion I tried looking at It seems odd that I wouldn't have an unprivileged |
IBM V7000 scripts for monitoring Posted: 05 May 2021 09:02 AM PDT Hello (I'm no hard core coder:), I try to develop a script to do some very basic monitoring on an IBM SVC. My goal is to get some information about the nodes and my quroum status and then send this information by mail. here's my code so far (I understood that grep command doesn't "work" on CLI for SVC). My problem is sending an email from the CLI to designed users. I don't find any valuable information anywhere on the internet. HINT: this script will be deployed on a jumppoint server (probably a windows server) in production, I cannot allow the installation of any exectution environment such as cigwin or perl or anything). Could you help me with that ? |
Applying changes to xorg.conf without restarting Posted: 05 May 2021 07:58 AM PDT I'm using Ubuntu 12.04 and making some changes to I know restarting the display manager (eg. lightdm) will sometimes work, is this the best way to do it? |
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