Skip to content

Tag: linux

sed for print two different word alernatively

I have a requirement to print two different words in alternative white spaces in the file. For example, The above scenario, I want print ab and /ab alternatively like below: *I want this one by one in a line by line format(Not horizontal format).*I know sed ‘s|^[[:blank:]]*$|</ab>|’ this com…

Not able to install Docker compose in Linux

I am not able to install docker compose on my Linux system.getting below error after running installation command: Can anyone please help me out? I tried sudo apt-get clean as well but no use Answer I think the easiest way to install docker-compose is via pip:

find: missing argument to -exec with ssh

Trying to remove directories from server: I tried with ; and ;; and ; and “{}” and -exec sh -c ‘rm -r “{}”‘ ; All get’s the error find: missing argument to “-exec’” Thanks Answer Directly running commands with ssh is often hard to impossible when you want …

Cannot insert breakpoints. Addresses with low values

I’m trying to debug this simple C program: But when I disassemble the main function I get this: And this is already pretty strange because addresses starts with a prefix of 4… for 32 bit executables and 8… for 64 bit executables I think. But going on I then put a breakpoint: I run it and I g…

Unnamed unix domain socket has wrong address length

When reading the address of a sending unix datagram domain socket in this minimal example program, I am getting an address length of 0, but the man page for unix domain sockets specifies that: unnamed: A stream socket that has not been bound to a pathname using bind(2) has no name. Likewise, the two sockets c…

Regex -> match a number between 000001 and 999999

I’m on Linux and I need to do an expr in order to match 6 digits with this range : 000001 to 999999 I’m stuck with ‘[0-9]{5}[1-9]’ but I can’t match numbers which end with 0 like 000010 I was thinking about ‘[0-9]{6}|?![0]{6}’ in order to eliminate “000000&#8221…

.net core in Linux – build C#

Linux Environment – Ubuntu 16.04 LTS. i have installed .net core 2.1300 (latest, with sdk). I am trying to build (dotnet build) a .csproj file in C#. But the error is: What possible solutions exists? maybe change .csproj ? Answer You are trying to build a full .NET (v4.6.1) application on a .NET Core pl…