Skip to content

Tag: bash

Bash Script is not working [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 4 years ago. Improve this question When …

File is not sort after sort

I have a problem with sorting my file. My file look like this geom-10-11.com 1 geom-1-10.com 9 geom-1-11.com 10 geom-1-2.com 1 geom-1-3.com 2 geom-1-4.com 3 geom-1-5.com 4 geom-1-6.com 5 geom-1-7.com 6 geom-1-8.com 7 geom-1-9.com 8 geom-2-10.com 8 geom-2-11.com 9 geom-2-3.com 1 geom-2-4.com 2 geom-2-5.com 3 g…

Iterating Ansible setup command

I want to use ansible setup module to retrieve hosts specs and I tried with a bash for loop. Ansible version: 2.4 My hosts inventory has been defined in a group of machines which I called rhelmachines I would like to collect the following list of variables called “specs” I am then trying to includ…

find: missing argument to -exec with ssh

Trying to remove directories from server: I tried with ; and ;; and ; and “{}” and -exec sh -c ‘rm -r “{}”‘ ; All get’s the error find: missing argument to “-exec’” Thanks Answer Directly running commands with ssh is often hard to impossible when you want …

Regex -> match a number between 000001 and 999999

I’m on Linux and I need to do an expr in order to match 6 digits with this range : 000001 to 999999 I’m stuck with ‘[0-9]{5}[1-9]’ but I can’t match numbers which end with 0 like 000010 I was thinking about ‘[0-9]{6}|?![0]{6}’ in order to eliminate “000000&#8221…