Skip to content

Tag: bash

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/…

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