Search Results

Search: Posts Made By: MadeInGermany
41
Posted By MadeInGermany
I think in addition to setting a spool name you...
I think in addition to setting a spool name you have to
SPOOL ON
Forum: Shell Programming and Scripting 3 Hours Ago
125
Posted By MadeInGermany
Really interesting. By definition it is a...
Really interesting. By definition it is a variable modifier that means the LHS must be a variable. Nesting can only be attempted on the RHS that is a string.
Apparently in zsh the LHS can be a...
103
Posted By MadeInGermany
Something like #!/bin/bash # the following {...
Something like
#!/bin/bash
# the following { command group; } is redirected to a file
{
file=/etc/login.defs
if grep -i "minlen" $file | grep -w "15" >/dev/null
then
echo "pass"
else
...
196
Posted By MadeInGermany
The while read loop ends when there is nothing...
The while read loop ends when there is nothing left to read. When it ended, the code after the done is run, i.e. it continues with the sleep command.
The outer while true loop never ends, because...
206
Posted By MadeInGermany
That means you must exactly run sudo su -. The...
That means you must exactly run sudo su -.
The following is an attempt to feed that with the desired command
for host in `cat hosts.txt`
do
echo "###########################Server Name- $host...
196
Posted By MadeInGermany
I gave brief explanations as comments in the...
I gave brief explanations as comments in the code.
The following are comprehensive ones:

while condition - do - done
is a loop. The condition is the read command that reads a line from the...
59
Posted By MadeInGermany
Is the FC card detected? Commands dmesg cat...
Is the FC card detected?
Commands
dmesg
cat /var/adm/messages
prtconf
196
Posted By MadeInGermany
You can store the filename in a variable and...
You can store the filename in a variable and construct the other filename from it.
In case it finds more than one filename use a for loop or while loop:
#!/bin/bash
while true
do
sleep 2400
#...
190
Posted By MadeInGermany
I guess you mean the file names? Then consider...
I guess you mean the file names?
Then consider sort and unique to sort out duplicates.
Show the duplicate file names:
$ sort your_example | uniq -d
server2_1-23-2020Show the non-duplicates:
$...
Forum: Solaris 4 Days Ago
264
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!
217
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...
346
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...
346
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...
416
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.
184
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) 1 Week Ago
417
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) 1 Week Ago
417
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#??} ))
416
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...
302
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.
302
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...
302
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...
308
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...
308
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...
361
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...
408
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 $...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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