Skip to content
Advertisement

Tag: regex

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 failure happens on server only and not on the development

searching a file in linux

I want to find in the system a file, and I know part name of it. How could I do that? I tried unsuccessfully the command: The problem is probably very easy however I cannot find a decent tutorial on searching files in linux. Please tell me what command solves my problem and if you know a good tutorial so

U-Boot version extraction for comparision

I am trying to extract U-Boot version from its binary for comparison, consider that exact string what I want to search is as follow, so I wrote command with regex as follows, However I don’t see any output for that above command, I could make below command work which extracts version only by comparing versions and not looking for date

How to replace special characters to underscore(_) perl

Using above code i am not able to handle this “Monday_øå_Tuesday_Wednesday” The output should be : Answer You can use W to negate the w character class, but the problem you’ve got is that w doesn’t match your non-ascii letters. So you need to do something like this instead: Outputs: This uses a unicode property – these are documented in

Advertisement