LINUX QUESTIONS MUST BE PROGRAMMING RELATED. Use this tag only if your question relates to programming using Linux APIs or Linux-specific behavior, not just because you happen to run your code on Linux. If you need Linux support you can try https://unix.stackexchange.com or https://askubuntu.com
I'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.Where ...
In Bash, what are the differences between single quotes ('') and double quotes ("")?
Could someone tell me whether or not I should wrap quotes around variables in a shell script?For example, is the following correct:xdg-open $URL [ $? -eq 2 ]orxdg-open "$URL"[ "$?" -eq "2" ] ...
Why does printf not flush after the call unless a newline is in the format string? Is this POSIX behavior? How might I have printf immediately flush every time?
I am working on a simple scripting project for work that involves the use of Bash. I have a pretty simple script that is something like the following:#!/bin/bashVAR1="$1"VAR2="$2"MOREF='sudo ...
I was trying to write a Bash script that uses an if statement.if [$CHOICE -eq 1];The script was giving me errors until I gave a space after [ and before ] as shown below:if [ $CHOICE -eq 1 ];...
I found some ways to pass external shell variables to an awk script, but I'm confused about ' and ".First, I tried with a shell script:$ v=123test$ echo $v123test$ echo "$v"123testThen tried ...
I'm launching a subprocess with the following command:p=subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)However, when I try to kill using:p.terminate()or p.kill()The command ...
Please see MSO question A long list of possible duplicates — C memory allocation and overrunning bounds for information about closely related questions.Developer environment: CentOS 4.7, Kdevelop 3....
Multiple glibc libraries on a single hostMy linux (SLES-8) server currently has glibc-2.2.5-235, but I have a program which won't work on this version and requires glibc-2.3.3.Is it possible to ...
OS: Linux, Language: pure CI'm moving forward in learning C programming in general, and C programming under UNIX in a special case.I detected a strange (for me) behaviour of the printf() function ...
Following links explain x86-32 system call conventions for both UNIX (BSD flavor) & Linux:http://www.int80h.org/bsdasm/#system-callshttp://www.freebsd.org/doc/en/books/developers-handbook/x86-...
Since printf is not reentrant, it's not supposed to be safe to use it in a signal handler. But I've seen lots of example codes that uses printf this way.So my question is: when do we need to avoid ...
I'm trying to write a small script to change the current directory to my project directory:#!/bin/bashcd /home/tree/projects/javaI saved this file as proj, added execute permission with chmod, ...
I came across a reference to it recently on proggit and (as of now) it is not explained.I suspect this might be it, but I don't know for sure.