Unix & Linux Weekly Newsletter
Unix & Linux Weekly Newsletter

Top new questions this week:

Can you legally sell modified versions of Linux distros?

Suppose somebody downloaded a Linux distro, like Ubuntu. Suppose further modify one piece of it, say the Window Manager. Would it be perfectly legal for them to sell copies of this slightly modified ...

/ licenses  
asked by George 29 votes
answered by hvd 52 votes

How to process a multi column text file to get another multi column text file?

I have a text file: a aa aaa b bb bbb c cc ccc d dd ddd e ee eee f ff fff g gg ggg h hh hhh i ii iii j jj jjj How can I process it and get a 2 ...

/ text-processing / awk  
asked by Ogrish Man 12 votes
answered by Thor 14 votes

Execution cycle of sed s/REGEXP/REPLACEMENT/g

Why does echo ,,, |sed s':\(,\)\(,\):\1*\2:'g yield ",*,," rather than ",*,*,"? In other words: why, despite the "g" flag, does sed not insert '*' between one pair of commas?

/ sed / regular-expression  
asked by user3143179 10 votes
answered by heemayl 11 votes

awk condition of true and false

I came across that if we use awk 0 inputfile, it will not print anything cause 0 means false of the condition. If we use awk 1 inputfile, it will print everything as 1 means true for each line awk ...

/ awk / gawk  
asked by sylye 7 votes
answered by Stéphane Chazelas 10 votes

What does "test $2 &&" mean in this bash script?

I'm looking at a bash script with the following code: #!/bin/sh set -e # Exit if any command fails # If multiple args given run this script once for each arg test $2 && { for arg in $@ ...

/ bash / scripting  
asked by mbigras 7 votes
answered by Stéphane Chazelas 13 votes

Find all absolute links in a directory tree

How do I (recursively) detect all symlinks in a directory that identify their target in an absolute as opposed to in a relative way? Since these links are very likely to break when an entire ...

/ symlink  
asked by Marcus Junius Brutus 6 votes
answered by Stephen Kitt 9 votes

How to get block device name from partition device name?

I'm looking for a portable way to obtain parent block device name (e.g. /dev/sda) given the partition device name (e.g. /dev/sda1). I know I could just drop the last character, but that wouldn't work ...

/ shell-script / partition / block-device  
asked by Dmitry Grigoryev 6 votes
answered by don_crissti 7 votes

Greatest hits from previous weeks:

How to switch between users on one terminal?

I'd like to log in as a different user without logging out of the current one (on the same terminal). How do I do that?

/ login / users  
asked by Tshepang 231 votes
answered by Pratt 263 votes

How to forward X over SSH from Ubuntu machine?

I have a machine running Ubuntu which I SSH to from my Fedora 14 machine. I want to forward X from the Ubuntu machine back to Fedora so I can run graphical programs remotely. Both machines are on a ...

/ ssh / xorg / xforwarding  
asked by Mr. Shickadance 176 votes
answered by Gilles 200 votes

Can you answer these?

Why is a variable in a `require`d module not always available?

I've got three module manifests in separate files (stripped down to bare essentials): class users { $user = 'foo' user { $user: ensure => present; } } class dvcs_cli { require users ...

/ puppet  
asked by l0b0 2 votes

Git Server with several repos

I'm setting up a git server, and there will be three different groups working on different projects iOS, WebDevel, Android. I need to do it in a secure/safe way. Meanwhile, I don't want iOS ...

/ ssh / security / git / repository  
asked by ParsaX 2 votes

How to render geojson locally

I have some visualizations which consists of data in the GeoJSON format. I would like to render the features to a png file. There are some sites which provide this functionality. I have for example ...

/ utilities / images / json  
asked by hfhc2 2 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3