Search Results

Search: Posts Made By: MadeInGermany
Forum: Solaris 3 Hours Ago
128
Posted By MadeInGermany
Look for an update of the driver/firmware. You...
Look for an update of the driver/firmware.
You bought them from Oracle? Contact Oracle support!
149
Posted By MadeInGermany
Regarding the version: lsb_release -a The given...
Regarding the version: lsb_release -a
The given kernel version only match for RHEL 7.7 or CentOS 7.7. Where the technical differences are neglectable.

The given grep command is one method to find...
276
Posted By MadeInGermany
You are right. In the post #12 I missed the other...
You are right. In the post #12 I missed the other next that skips the following 1 (always true and default print).
In fact it prints the page count after the last line. So the FNR!=NR (default print...
276
Posted By MadeInGermany
I wonder if one should consolidate to one lengthy...
I wonder if one should consolidate to one lengthy condition?
Here is my attempt
awk -F';' '
FNR!=NR
/This is the last line of the page/ {
if (FNR==NR) total++; else printf "Page No:%d of...
345
Posted By MadeInGermany
Actually, if the 2nd nameserver in...
Actually, if the 2nd nameserver in /etc/resolv.conf goes down, there is no impact at all, unless there is options rotate.
130
Posted By MadeInGermany
You must prune the excluded directory. -o...
You must prune the excluded directory. -o continues when not pruned.
Further, find is recursive; you may not run another recursive command in it.
find /mysite/public_html -wholename...
Forum: OS X (Apple) 3 Days Ago
275
Posted By MadeInGermany
I see. Here is how to strip leading zeros with...
I see. Here is how to strip leading zeros with Posix-shell-builtins:
num=${TEST_VAL#??}
lz=${num%%[1-9]*}
TEST_VAL=${num#$lz}
Don't know if this is really faster than expr.
Forum: OS X (Apple) 5 Days Ago
275
Posted By MadeInGermany
Better replace all expr with arithmetics by the...
Better replace all expr with arithmetics by the builtin=faster $(( ))
SEED1=$(( ${SEED1} + 1 ))
TEST_VAL=$(( 0${TEST_VAL#??} ))
345
Posted By MadeInGermany
Obviously the default timeout is too high. Add...
Obviously the default timeout is too high.
Add two lines to /etc/resolv.conf
options timeout:2
options attempts:2

These values will give a total delay of 2 * 2 = 4 seconds when the first DNS...
237
Posted By MadeInGermany
The -H is specific to GNU ps (Linux). It does...
The -H is specific to GNU ps (Linux).
It does an indentation (two spaces per hierarchy level) without any ASCII art. This is easy to post-process i.e. filter for the releavant parts.
237
Posted By MadeInGermany
Sorry, somehow my copy/paste left out a bunch of...
Sorry, somehow my copy/paste left out a bunch of lines.
Now I have corrected my original post.

--- Post updated at 11:24 ---

@nezabudka, the goal was to only show a relevant part of the...
237
Posted By MadeInGermany
[Tip] ptree for Linux
Unix (and Linux) uses a process tree that gives a natural security, by simple inheritance of attributes.

The following ptree script shows it. It runs on all Linux flavors.
Mostly useful for...
237
Posted By MadeInGermany
Yes, now you can see the respective links in the...
Yes, now you can see the respective links in the /etc/rc.d/rc?d/ directories.
First you can test your script with e.g.
service myscript stop
service myscript start
And if this works fine, do a...
237
Posted By MadeInGermany
rc.local is for compatibility with BSD Unix, not...
rc.local is for compatibility with BSD Unix, not well supported in Linux :(

In your start/stop script reate a dependency header - comments with certain keywords that belong to the LSB (Linux...
303
Posted By MadeInGermany
An not inititalized variable (or array element)...
An not inititalized variable (or array element) becomes 0 in number context, and "" in string context.
In this case, since 0 is the minimal possible string length, the 0 is perfect.

With two...
343
Posted By MadeInGermany
Add # sed '/^&@@10.10.10.10/ s/^/#/'...
Add #
sed '/^&@@10.10.10.10/ s/^/#/' /etc/rsyslog.confRemove #
sed '/^#&@@10.10.10.10/ s/^#//' /etc/rsyslog.confThe & is special in sed in the replacement string. This is avoided now.
But:
The $...
437
Posted By MadeInGermany
Can be done as a { } group. (Note: there must be...
Can be done as a { } group. (Note: there must be a semicolon or newline before the closing brace! And of cause spaces next to the [ ] { } )
if [ -f ./file2 ] && [ -f ./file3 ] && { [ -f ./file1 ]...
318
Posted By MadeInGermany
The latter suggestion is portable. Once defined...
The latter suggestion is portable.
Once defined as a function it becomes handy:
rightpad0() { printf "%s%0$((${1}-${#2}))d\n" "${2}"; }

rightpad0 9 2457
245700000
309
Posted By MadeInGermany
inotify (in Linux) is most efficient. You can...
inotify (in Linux) is most efficient.
You can also poll the file with fuser (or lsof).
file=tempfile
if [ ! -f $file ]
then
echo "$file is not present"
elif pids=$(fuser $file 2>/dev/null); [...
Forum: Linux 2 Weeks Ago
493
Posted By MadeInGermany
On Linux you can list your current "locale" with...
On Linux you can list your current "locale" with command
localeThe installed/available locales you can list with
locale -aThen set an appropriate locale, for example
export LC_ALL=es_ES.utf8and...
Forum: Shell Programming and Scripting 2 Weeks Ago
427
Posted By MadeInGermany
Or do all in bash - here is a well documented...
Or do all in bash - here is a well documented bash version:
#! /bin/bash
# bash v3 or higher

# file with list of items to find in modify_file
list_file=$1
# file for which a modified copy will...
655
Posted By MadeInGermany
You can save half of the memory by not storing in...
You can save half of the memory by not storing in arrays.
set -f # for safety: no filename generation
for i in $(cat elementen.txt)
do
for b in $(cat ITEMID.txt)
do
db2 -x "select...
640
Posted By MadeInGermany
If you have a rule like "cdc must appear at the...
If you have a rule like "cdc must appear at the beginning of the line and followed by a character",
then a simple RegularExpression does it:
perl -pe '/^cdc./ and s/^/#/' abc.txt
A -i option will...
371
Posted By MadeInGermany
The following does not work as intended: ...
The following does not work as intended:
set r=$r | tr "\n" " "
set r=$r | tr "\r" " "

set lwp=$lwp | tr "\n" " "
set lwp=$lwp | tr "\r"...
497
Posted By MadeInGermany
In awk you can strip the \r as follows awk ' ...
In awk you can strip the \r as follows
awk '
{ sub(/\r$/, "") }
...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 07:37 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy