I can do soxi -d * to get audio length information in hours, minutes, and seconds. However it would only give me info on the individual audio length. If I wanted to see the audio length for the entire folder, how can I accomplish such task? like when you do “wc -w” it shows the sum of everything a…
bash – print regex captured groups
I have a file.xml so composed: I need to extract the following information: mayor_and_minor_release_number –> 1.0 patch_number –> 13 suffix –> -alpha I’ve thought the cleanest way to achieve that is by mean of a regex with grep command: I’ve checked with regex101 the cor…
How to hide untracked files in GitKraken’s “Unstaged Files”?
When current work in progress branch is selected, GitKraken shows two types of files: “Unstaged Files” and “Staged Files”. Quite often there is a huge amount of files listed under “Unstaged”, even only a few are really under source control; files are mostly untracked. Is it…
“tee” allows us to redirect output from a command – is there any simple way to output the command string being run itself too?
When looking at log files many times I wonder what options/parameters did I use when running a given command that generated this log file. Is there any simple way to output the command string being run itself too into stdout to be redirected into the log file at the top of the file? Answer You can echo the co…
Change Tiny Proxy IP per request on EC2
I’m fairly new to Proxy servers and how they work exactly. I recently span up an AWS EC2 instance to act as a proxy server using tiny proxy. Everything seems to work just fine however i am curious about something. Is it possible to configure tiny proxy to use a different public IP each time it makes a r…
Move a file and rename it if the destination folder contains also a file with the same name
Sorry for my bad english. I want to move a file from the Desktop to user’s input destination. If destination has also a file with the same name, how can i ask user to rename the file so that he can have them both in destination folder? I have this right now: Answer Demonstrating using mv and switches -i…
NodeJS – Error: connect ECONNREFUSED 127.0.0.1:port (chrome-remote-interface)
I made a script using chrome-launcher and chrome-remote-interface to save a webpage to pdf using Chrome. It works without any issue on my Windows machine, but when I try it on CentOS 7, I obtain the following error and I can’t figure out why. Both use Chrome v86. On Windows I use NodeJS v12.18.4 On Linu…
Docker bind source path does not exist even though it does
I have two ubuntu server VMs running on the same proxmox server. Both are running docker. I want to migrate one container from one of the VMs to the other. For that I need to attach a USB drive to the target VM which will be mounted inside the docker container. I mounted the drive exactly the same way in
using grep commands to find a duplicate id within a json file
I am looking for a way to use grep on a linux server to find duplicate json records, is it possible to have a grep to search for duplicate id’s in the example below ? so the grep would return: 01 Answer OK, discarding any whitespace from the JSON strings I can offer this if awk is acceptable – hut…
Extracting a set of characters for a column in a txt file
I have a bed file (what is a txt file formed by columns separated by tabs). The fourth column has a name followed by numbers. Using the command line (Linux), I would like to get these names without repetition. A provided an example below. This is my file: My list should look like this: Could please help me wi…