Description:
Using and programming the Unix shell.
|
|
|
Perl regex - How to make my greedy quantifier greedier?
|
| |
Hello,
I would like to try some string matching in perl as is in the title.
Let's create some testfiles for testing as follows.
$ mkdir -vp testing/dir.a/dir_b/dir-c; cd testing/dir.a/dir_b/dir-c; \
touch This_is_testing1_org.txt This-is-testing2_org.txt \
this_is_testing3_org.txt this-is-testing4_org.txt; cd... more »
|
|
Gnuplot Question
|
| |
Not sure if this is the right group...
I have a data file of the following format:
servername,2013-05-11 17:46:03,SomeText,195,195,11,2 02
servername,2013-05-11 17:47:03,SomeText,192,192,23,1 03
servername,2013-05-11 17:48:03,SomeText,189,190,14,1 17
servername,2013-05-11 17:49:03,SomeText,196,195,24,2 31... more »
|
|
rsync as root without ssh as root
|
| |
Hello all,
I do my backups with rsync, but since I won't allow ssh root logins, I always thought that I had to physically connect the disk to the PC.
Since I keep my backups offsite, I'd much rather also do the backup via ssh.
I recently saw an comment mentioning that it is possible for rsync to become... more »
|
|
converting publication lists to html
|
| |
I have to convert a slew of publication lists to html and because this would be quite tedious, I decided to write a short script to do the work for me.
The simple script below reads each line of the file. If the line has text, it just prints the line. If the line is blank, it prints the closing "</div>" and the opening "<div>" with an in-line style set for the time-being. When it encounters a 2nd consecutive blank line, it just prints the blank line using the flags.... more »
|
|
bash -> dash translation
|
| |
Hi,
I recently got bitten by the change from bash to dash as the default
/bin/sh in Debian. While bash was the default, the following ran fine
(shebang in the script is "#! /bin/sh"):
local projstr=$(${GMT} grdinfo "${raster_prefix}.grd" | \
awk '/Remark: / {sub(/.+Remark: /, ""); sub(/; .+/, ""); print}')... more »
|
|
What meaning of the ',' in ifneq ($(KERNELRELEASE),)
|
| |
Hi,
I am reading the following Makefile script. I do not understand the ',' in the ifneq clause. I do not find the explanation in a pdf book on 'make'. Could you explain it to me?
Thanks,
.....................
...ifneq ($(KERNELRELEASE),)
obj-m := hello.o
...else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build... more »
|
|
Script - empty variables
|
| |
Hi,
Please help me solve this issue.
Script below shows empty variables:
...set -x
Data=`date +"%Y%m%d%H%M"`
df -Pk | awk ' (NR > 1)' | awk '{print $(NF-2), $(NF-1), $NF}' | tr
'/' '#' | tr '%' ' ' | { while read Available_ Perc_used
Mount_point
do
Available=$(($Available_/1000) )... more »
|
|
|