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
Tag: bash
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 to quickly rename my files on macOS or linux from CLI?
Here’re my source files. I need to figure it out a way to rename all the files to remove the first 36 characters up to _file or replacing as something else. I am expecting all the files are as below. Thanks in advance! Answer You can use rename like this: If you are on macOS, you can install rename with
Ubuntu shell script – Scanning the drive for archives: ERROR: No more files
I have installed the package p7zip-full for ubuntu and I am running the following shell script named 7z and placed within the same directory as the dataset zipped files The dataset folder looks as in the image and I get the error below although this certain file exists within my directory. How can I resolve the issue? I use Ubuntu
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
Add a column from one file into another file using AWK for a given condition [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question First of all, thank you for your help. I have 2 files which are And I wanto to filter both