Category "linux"

Linux script executing from C++ code with execv fails

I've a very basic Linux script (/home/scripts/script.sh): #!/bin/bash echo 'a' | /bin/netcat -vv 10.10.10.1 3333 echo "done" > /tmp/result When I try to r

Suppressing summary information in `wc -l` output

I use the command wc -l count number of lines in my text files (also i want to sort everything through a pipe), like this: wc -l $directory-path/*.txt | sort -

How to extract value from json contained in a variable using jq in bash

I am writing a bash script which has a json value stored in a variable now i want to extract the values in that json using Jq. The code used is. json_val={"co

Can't open lib 'ODBC Driver 17 for SQL Server' : file not found

I am fairly new to Python and Azure web apps. Any help is appreciated. My setup: Program: Visual Studio code Language: Python-Flask Cloud provider: Microsoft

Test run cron entry

I added a cron job recently, but made a mistake in the path while giving the command and hence, the job never succeeded. Is there some way to test the cron chan

Script file to run in android devices with help of the sh present in adb shell

I am facing a problem in writing a shell script for android devices to be run only on sh present in the device (/system/bin/sh). I have written the following s

How to compile GTK2 source code?

I'm trying to modify GTK2 on Ubuntu Oneiric. I download the source: apt-get source libgtk2.0-0 cd gtk+2.0-2.24.6/ I try to compile and overwrite the current

How to compile GTK2 source code?

I'm trying to modify GTK2 on Ubuntu Oneiric. I download the source: apt-get source libgtk2.0-0 cd gtk+2.0-2.24.6/ I try to compile and overwrite the current

git clone and cd into it

If I wanted to make a directory and change directory into it all in one line, I could do something like this: mkdir dir_name && cd $_ How can I do the

GtkStatusIcon label in Gnome3

How can affect on my app's status icon label in Gnome3? When i moving cursor on it shows me my app's executable name. How can I change it?

Running gdb on xv6-riscv-fall19

So I follow the commands on the website. I open one windows and I used the command: sudo make qemu-gdb. And it asked me to use another terminal to start gdb.

building kernel module and resolve missing symbol definitions

If I build a module which depends on other modules, and i get this warning: 'function or symbol ?' [source dir/my_module.ko] undefined! What does the warn

Check whether a path is absolute or relative

How do you check whether a path is absolute or relative, using C on Linux?

How do you compare the value of an array to a variable in bash script?

I'm practicing bash and honestly, it is pretty fun. However, I'm trying to write a program that compares an array's value to a variable and if they are the same

How do you compare the value of an array to a variable in bash script?

I'm practicing bash and honestly, it is pretty fun. However, I'm trying to write a program that compares an array's value to a variable and if they are the same

How to check if ssh-agent is already running in bash?

I have a sample sh script on my Linux environment, which basically run's the ssh-agent for the current shell, adds a key to it and runs two git commands: #!/bi

MySQL upgrade fails on Ubuntu 16.04

I have Ubuntu 16.04 running (clean install - no upgrade). MySQL is running fine - but I get this error when I try to update MySQL: apt-get install Reading pack

grep search with regex

how to find a line that contains exactly 3 "w", 5 "t" and no "v" with grep? Input: ---------- aabbccddd4444 wccwwtttjjttuu zzxxxwwwmmmnnnn Expected output: --

kernel make error "arch/x86/entry/syscall_64.o:(.rodata+0x1120): undefined reference to"

This error stops my kernel make process ld: arch/x86/entry/syscall_64.o:(.rodata+0x1120): undefined reference to `__x64_sys_fd' BTF .btf.vmlinux.bin.o pahol

Can one specify a file content-type to download using Wget?

I want to use wget to download files linked from the main page of a website, but I only want to download text/html files. Is it possible to limit wget to text/