Skip to content
Advertisement

Tag: bash

Bash/xargs: How to mass assign user privileges?

I have created a new user. My current user obviously has the following rights: Where max is the name of the current user account. I tried paramer expansion but the output of ${groups} is empty, so I just piped groups to xargs I get the error message that there is no folder max adm cdrom sudo dip plugdev lpadmin lxd

How to open apps from bash (Linux)

Automate part of your life where you can! (It doesn’t seem to be working properly…). This time is for opening multiple apps on my desktop while I make my morning coffee. I created a .sh to open my workspace apps like Visual Code, Slack, Firefox, etc. The script is basically: I basically found the paths to the executable apps and

How do i get the debug/return strings out of bluethootctl

How can i retrieve those two lines: Changing discoverable off succeeded [CHG] Controller 64:6E:69:F4:9E:72 Discoverable: no Basically grabbing the output or other possible error outputs and discarding the rest of the garbage I’m attempting to do a fork of a very simple bluethooth dmenu bash script, and I am being somewhat successful at it, but since I’ve considered releasing it

condition match with find and if else in bash

I want to see the files which are before 15 days modified into a directory. if not found before 15 days, then look for 10 days before. My Attempt Answer FileList is a string which holds the names of all files (separated by spaces), for instance something like /var/log/foo /var/log/bar. You then test in your condition whether you have one

Traversing a directory using Makefile

I am making use of a makefile to traverse a directory , store the file names in a variable , extract the file number using regex and print the file number . Below is the code block I am using : LINE 7 is the command in makefile I want to include in the for loop. I want the actual

Problem filtering 2 files using AWK for a given condition

First of all, thank you for your help. I have a problem filtering 2 files using AWK conditionals. The two files I want to filter are these one: Fasta.fa species_id (the file is larger and contain the name of different species) I want to use awk so it puts in fasta.fa the name of the species if both $2 in

Unexpected characters coming in bash in while loop

I am trying to get IP of a few 1000 domains… below is my program… it shows me sh -x domains-ip.sh $ and ‘ and r is not something I was expecting… Any idea where I am doing wrong? I check While Loop in Bash Unexpected Character but the selected answer I am also using… PS: is there any better

Advertisement