Search Results

Search: Posts Made By: MadeInGermany
109
Posted By MadeInGermany
It is pgrep -l rpm | while read pid cmd ... ...
It is
pgrep -l rpm | while read pid cmd
...
or better
pgrep -x rpm | while read pid
...
Even better is to check for the elapsed time
ps -e -o pid= -o etime= -o fname= |
while read pid etime...
167
Posted By MadeInGermany
Run it in debug mode: either put set echo in...
Run it in debug mode:
either put set echo in the script (and unset echo to turn it off again).
Or run the script with csh -x scriptname
429
Posted By MadeInGermany
In ksh88 (and bash) you can emulate f [[ ( $a...
In ksh88 (and bash) you can emulate
f [[ ( $a =~ sss[0-9]*$ ) ]]
with
if [[ $a == *sss* ]] && [[ ${a##*sss} != *[!0-9]* ]]
And
f [[ ( $a =~ ^sss[0-9]*$ ) ]]
with
if [[ $a == sss* ]] && [[...
167
Posted By MadeInGermany
If you really must use csh, then try to make it...
If you really must use csh, then try to make it more robust.
#!/bin/csh
# ` ` is whitespace-separated and subject to expansion, but in list context you can "` `" that is newline-separated and no...
429
Posted By MadeInGermany
Obviously ksh88 - that knows [[ ]] but not its ...
Obviously ksh88 - that knows [[ ]] but not its =~ operator.
Is it possible to use bash instead?
142
Posted By MadeInGermany
Obviously it does so :( Once in Solaris...
Obviously it does so :(

Once in Solaris there was a bug that a "crontab" command wiped the crontab, even if it was aborted with Control-C.
Sun fixed it soon.

BTW, I have some scripts that...
142
Posted By MadeInGermany
Looks like a little bug. crontab filename...
Looks like a little bug.
crontab filename should check that filename exists and is a regular file (not a directory, device node, or other special file).

Just crontab (without arguments) should...
147
Posted By MadeInGermany
Do you want to only replace the D5 ? The...
Do you want to only replace the D5 ?
The following merge script replaces D5 and D6 (all what matches);
#!/bin/ksh
# also works with bash-4

# Merge script: the two input files must be in the...
182
Posted By MadeInGermany
Or simply /bin/df . That by default tells the...
Or simply
/bin/df .
That by default tells the "ifree" as "files", and works with "network shares" (NFS and others).
213
Posted By MadeInGermany
I guess the Linux subsystem works with the...
I guess the Linux subsystem works with the Windows kernel, and that does not perform like a Linux kernel.

So why not the opposite - Linux and Wine?
Forum: HP-UX 6 Days Ago
201
Posted By MadeInGermany
A recent Gnome is very hard to build, because it...
A recent Gnome is very hard to build, because it depends on a dozen Linux-specifics: glibc, glib, xrandr, gvfs/fuse, dbus, systemd.
I was surprised that Oracle has done the effort for Solaris 11....
290
Posted By MadeInGermany
Is df /backup/Bckup_180320.tar &giving a...
Is
df /backup/Bckup_180320.tar &giving a result?
If it hangs hard, then there is some serious trouble. Then do further diagnostics, e.g. check mounts with
mount | grep /backupNot responding to...
239
Posted By MadeInGermany
The previous post is only for GNU sed that is...
The previous post is only for GNU sed that is compiled with a recent glibc that has got the \S \s from perl (PCRE (https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions)).
If you want...
1,652
Posted By MadeInGermany
Most easy: let the add.txt begin with an empty...
Most easy:
let the add.txt begin with an empty line!


If you really want an extra command to add the empty line, then...


The \n handling is a bit strange in GNU sed. The following seems to...
429
Posted By MadeInGermany
Of course it is [[ $string2 =~ ROS[0-9]+$ ]]...
Of course it is

[[ $string2 =~ ROS[0-9]+$ ]] && echo OK || echo NOK
Minimum one digit.
618
Posted By MadeInGermany
After studying the man page myself I have come to...
After studying the man page myself I have come to the conclusion that pax wants to either read files from a filesystem or write files to a filesystem or both.
So my first perception was wrong - pax...
618
Posted By MadeInGermany
pax can do some modifactions on a tar stream. ...
pax can do some modifactions on a tar stream.
man pax
611
Posted By MadeInGermany
In your .forward file, put \username,...
In your .forward file, put
\username, outlookuser@address
That should forward to the local inbox of "username" and send a copy to the outlook address.
Perhaps the comma is not accepted as a...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,602
Posted By MadeInGermany
As Scrutinizer said, %q is likely not portable. ...
As Scrutinizer said, %q is likely not portable.
And, %q solves a problem that would deserve a better solution.
The natural delimiter for piped input is a newline.
So perhaps you can use that?
Try...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,602
Posted By MadeInGermany
Did you really read my post? I wanted to tell...
Did you really read my post?
I wanted to tell you this:
# Simple echo
echo_(){
( IFS=" "; printf "%s\n" "$*" )
}

ECHO=echo_
The function is named echo_ (not echo and not echo_!)
and has...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,602
Posted By MadeInGermany
Use an echo_ function...
Use an echo_ function (https://www.unix.com/shell-programming-and-scripting/283413-tip-better-echo.html?highlight=tip)
and set ECHO=echo_!
441
Posted By MadeInGermany
Do you have the command that does it (once)? ...
Do you have the command that does it (once)?
Then you can put it into crontab with an appropriate schedule.
Read about the crontab with
man crontab
Forum: Homework & Coursework Questions 3 Weeks Ago
911
Posted By MadeInGermany
604 permission means r+w for owner, nothing for...
604 permission means
r+w for owner, nothing for group, w for others!
This is very unsafe: others may alter the file!
Check with "ls -l filename".
1,652
Posted By MadeInGermany
You had the wrong quotes. sed -i "/$arg/r...
You had the wrong quotes.
sed -i "/$arg/r add.txt" ssl.confand the shell will substitute the $arg.

--- Post updated at 11:14 ---

But if you have multiple Listen and want to insert test after...
665
Posted By MadeInGermany
Good to know. Bash was first with brace...
Good to know. Bash was first with brace expansion, now ksh and zsh are ahead. Let's see when bash will catch up again.
BTW, Bash-4 has got a number + field alignment expansion:
echo {01..10}
01 02...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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