I’m looking for an answer that doesnt include -i option to get both upper and lowercase. Specifically just how to make the regular expression itself output such a string. I also do not want it to return any other strings outside of the consecutive “aeiou”. For example I want to see: aeiou AE…
Tag: bash
remotely determine using ssh IF a machine needs to be rebooted [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago. Improve this question There are plenty of examples of HOW to reboot a linux machine via SSH. However, in my case I…
Concatenate directory and file name in GNU parallel
I have the following directory structure: I would like to convert all .ogg files to .wav with GNU Parallel. Here’s where I got thus far: The problem here is that although obviously directories have different names, the files inside have the same name. The aforementioned command will continuously overwri…
How to run remote script on multiple host simultaneously
I have a great amount of Linux servers to maintain. Frequently I need to run a script (script.sh) on all of them to get the health status, this script usually takes about 30-40 seconds to give an output. To facilitate maintenance tasks, I’m writing a shell script that uses SSH to loop through all remote…
[: missing `]’ error in Unix | shell Script [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 3 y…
Print value of by loop in the end of line in bash
My file which run loop… My program file My result is My should I do so result come like I will be very glad if someone can help me out, Answer A possible solution would be to replace the line: echo $country >> /wdc-cron/count-$yesterday.txt with: printf “$country, ” >> /wdc-cron/…
Recursively change file name in folder and subfolders without changing file path
I have files in a format like 639486572_016b0f3d-9ec3-4ad1-84ae-c98b68390322.wav. The files reside in a folder and sub-folder format that resembles a date. ./2019/05/31/639486572_016b0f3d-9ec3-4ad1-84ae-c98b68390322.wav. The goal is to remove everything before and including the _. Which im able to do with ren…
similarity between the two files using grep, why this work: grep -i “-ffile1” file2
I have two files, file1 and file2, and want to find the similarity between the two files using grep. why -f should flow by the file name without spaces when I surround the -f file1 with quotes? this will work but this will not work but if I remove the quotes these two cases will work Answer By convention, one…
How to make an autoinstall command script for Debian
So I was working on a project that need some libraries . so I decided to made an .sh script to just install all at once but I don’t know why it fails . I was searching about it , but just found how to create installer like .deb , etc here are the commands lines that I use install.sh
use cat <> to insert actual strings and escape logic
I am writing a script to automatically create SWAP on an AWS ephemeral volume. Part of that process requires the script to ‘sense’ which nvme to apply swap to since AWS Linux can reorder the nvme names at stop/start. I am using Terraform to run a ‘start-up’ script which does a ton of s…