Relative Content

Tag Archive for linuxbash

How to identify specific file sequences using Bash

I am new to using this coding language. I am trying to write a code that would allow me to identify specific files that are named with dates at the beginning and then go into those files. However, I only need to go into 2 of the files and some areas may have 4 or 5 files in them. Is there a way to code so that I could go only into files with years 2023-2024 or 2022-2023 or 2021-2022?

Bash pipe vs redirect?

I am working with the Orca quantum chemistry software on Linux. It doesn’t accept input through stdin, but does accept input through a file. I want to generate these input files on-the-fly using a bash script and pipe them in, so I wrote a script called orca_stdin.sh: (note that fd0 is a symbolic link to /dev/fd0 since Orca tries to write output files in the same directory as the input files)

Simple bash script to show Groups with Dialog?

I want the program to display all groups in the system in the dialog when I click on “show groups” and the program to end when I click on “finish”. But somehow I get an error saying that I’m missing the “fi” which isn’t right. Or the groups are also displayed when I click on finish.

`source` in bash breaks with one of the apparently identical files

I have two files which look apparently identical (link here). I don’t seem to find any difference between the two. However, on running source env-setup.sh, which is one of the files, bash runs happily. But running source env-setup-ioannis.sh, which is the other file, bash complains with the following error message: : command not found. Can someone please help me find out the issue?