Skip to content

Tag: bash

possible missing library when running cmake

I am trying to install a program on my machine (running Linux), but I get the following error when I run make: What is wrong, am I missing a library? Answer The problem is that the Makefile uses bash specific syntax (|&) but the commands are executed by /bin/sh, which does not point to /bin/bash. On my co…

bash script – executing find command gives no output

I’m a total noob at bash so this is most likely a syntax error, but I could not find anything that worked for my syntax in my searches. From terminal, running find . -name “*g*” results in However, running this bash script called grepdir.sh from terminal as grepdir.sh . “*g*” res…

Awk asking combine two files

I have combined two different files with Same Key by AWK command. And In case there is no key match compare to File1 and File2 then just put “ttt” instead. I have below AWK command. Example Combine File1 File2 Then Expected result My AWK Command Show I already tried to do few way like below But lo…

What is a better way to read each line in a file in linux?

Hi all, I want to read each line in a file and then make a whole url to do some thing. The above scripts worked, but what is a better way to read file line by line? Thanks. Answer This is a nice example of the useless use of cat, simply use IO redirection: The use of -r in read