Skip to content

Tag: linux

R packages: RCurl and curl packages install failure on Linux

I hope you can help with this issue I have come across whilst installing RCurl and curl packages for R. Answer That looks like that you have different versions of libcurl. One approch could be the following one (for your console): Then you can use ldd libcurl.so to find all dependencies and shared libraries t…

printf in awk with Umlauts doesn’t work

Can somebody please give me an alternative to the following awk statement. As soon as I give a “n” for string, it skips after Umlaut. I don’t want to use gsub because I have many special characters and don’t want to write a script for this. Also if not in awk, can somebody help me in o…

Run shell script exactly once with cronjob

I have a cron job that calls a script that checks for updates once every hour. If there are updates, it will call update.sh, which in turn calls commands.sh. I would like each “new” commands.sh to be run exactly once. I was thinking of writing to a file each time I run commands.sh with some unique…

BASH regex check not matching on linux

I have been scripting something in BASH and I have found a strange bug. I have been developing on Mac (El Capitan) and everything is working flawlessly. But deployment on Ubuntu 16.06 server is failing and I have no idea why. My code follows for input 6LfMYB8TAAAAACRZ9bP-0GN9y4zKUYPtj255-e8A this fails. And f…

Merging two files in bash with a twist in shell linux

The following question is somehow tricky but seemingly simple , i need to use bash let us suppose i have 2 text files, the first on is FirstFile.txt SecondFile.txt I want to be able to create a new Thirdfile.txt that contains that values that are not in file A , meaning if there is a common variable with file…

How can I extract text from between two xml tags using sed

I have the following output from curl: How can I retrieve the text between <id> and </id>? I tried using: but that results in the entire block of text being printed out instead of just the part between and <id>. I don’t have the ability to install programs on this box so I’d rath…