Skip to content

Tag: linux

Match unknown substring with RegEx

How can I get an unknown substring with an regular expression? I know what’s before and after the wanted string but I don’t want the known part with in the result. Example text: I’m looking for ‘SOMETHINGHERE’ and ‘SOMETHINGELSE’ only. vocher_ and .db are always befor…

Linux: Loop using foldername when finding file

I’m currently trying to use the following linux script to loop through folders and perform calculations using a function: The problem: How can I use the foldername to find the correct file? For example, the foldername is scan1 and I want to use the file called gaf_scan1_recording_mic.nii for the functio…

Install java 8 and 7 RE in linux Ubuntu

I already have installed in my linux Ubuntu the java 8 (Update 121), but I need to install the java 7 RE for a specific software that I need to use. I want the java 7 only to use with this tool, and I do not want to make any modification on my default java 8. How to do that?

Linux bash script symlink with spaces

I am trying to make a script which will find all the folders and files within a given hard drive. then i want to make the symlinks to another folder. However the ln command fails if the folder or file contains space, can someone help me to modify the ln -sf $MOVIE_FILE_LINKS -t $MOVIES_LIB command to make the…

Cannot Make Code Segment Execute-Only (Not Readable)

I’m trying to make the Code Segment Execute-Only (Not Readable). But I FAILED after I tried everything the Manual told me to. Here is what I did to make the code segment unreadable. First, I’ve found this in “Intel(R)64 and IA-32 Architectures Software Developer’s Manual(Combined Volum…

iconv not complete convert to utf8

When I converted the my text on this site, be converted correctly: http://string-functions.com/encodedecode.aspx I choose source ‘Windows-1252’ and target ‘utf-8’. See it in the screenshot below: https://i.stack.imgur.com/2Pn4E.png But when I convert with the following code, Some lette…

ESP8266 module fails at boot

I have a ESP8266MOD ESP-12-E hooked up to a USB-to-UART module. When I try to communicate with the module I get some intelligible output then an error message and the communication is closed. For ai-thinker-0.9.5.2-115200 and espressif-nonos-2.0.0-SDK (this is not the actual name of the file): For a nodeMCU f…