In tcsh, I can run commands like: …using an alias defined as such: I’m trying to get an equivalent to this for bash. Currently, I’ve tried making a separate bash function for each subcommand, like so: I can be sure the program calls have been executed, since the unexisting module (added by p…
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 …
How to configure the find command to run in a Linux shell script?
I am trying to run the following find command in a Linux shell script. When I run the command in the terminal, it successfully finds all the files with the extension .mp4 from the specified folder, and copies them to a temp folder. However, when I run it in my file_mover.sh Code: Output: I think I’m mis…
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”…
Pass input/variables to command/script over SSH using Python Paramiko
I am having issues passing responses to a bash script on a remote server over SSH. I am writing a program in Python 3.6.5 that will SSH to a remote Linux server. On this remote Linux server there is a bash script that I am running which requires user input to fill in. For whatever reason I cannot pass a
exists in filesystem (owned by filesystem) in PKGBUILD for arch linux
I am trying to build my own mariaDB arch linux package with PKGBUILD i have binries which are teady to be installed . I has bash script (arch linux PKGBUILD) which runs fime and creaes the pkg.tar file . When I try to install it with pacman I get this :- here is my PKGBUILD file :- what should I
Shell script: Redirect output of program to changing files
My goal: I would like to redirect the stdout output of my program foo to a changing output file depending on the running time of the program. The program foo itself is listening on a bsd socket for arriving packets and displays information contained in them. So essentially, after running the program foo for 1…