Showing results 1 to 25 of 500
Search took 0.10 seconds.
Search: Posts Made By: MadeInGermany
Forum: UNIX for Beginners Questions & Answers 17 Hours Ago
Replies: 1
Views: 138
Posted By MadeInGermany
I cannot see such an error. Perhaps you have...

I cannot see such an error.
Perhaps you have WinDOS format? Then convert with dos2unix or a similar tool.
Check syntax with
csh -nx scriptfileApparently some assignments are in sh syntax where csh...
Forum: Shell Programming and Scripting 18 Hours Ago
Replies: 1
Views: 194
Posted By MadeInGermany
After consulting man netstat I have found...

After consulting
man netstat
I have found that
netstat -n -f inet -f inet6
in Solaris comes close to the Linux
netstat -n -t
Solaris does not have anything that corresponds to the -p (show...
Forum: Shell Programming and Scripting 18 Hours Ago
Replies: 5
Views: 208
Posted By MadeInGermany
Other methods are possible but not easier: if...

Other methods are possible but not easier:
if [[ $(( ${LP_PP[0]} * 2 )) == ${LP_PP[1]} ]]Within $(( )) one often does not need a further ${ },
and when you know you have numbers you can compare...
Forum: What is on Your Mind? 2 Days Ago
Replies: 8
Views: 245
Posted By MadeInGermany
And a big Danke from Germany!

And a big Danke from Germany!
Forum: Programming 2 Days Ago
Replies: 3
Views: 173
Posted By MadeInGermany
Or this simple one: sed 's/CODERS */Coders /'...

Or this simple one:
sed 's/CODERS */Coders /' file
Forum: Solaris 4 Days Ago
Replies: 10
Views: 402
Posted By MadeInGermany
type ufs means the filesystem type is UFS. ...

type ufs means the filesystem type is UFS.
Where files cannot be greater than 1TB.
Look at my post#5.

Maybe it is possible to compress the data when it is copied to the UFS disk?

Otherwise I...
Forum: AIX 5 Days Ago
Replies: 8
Views: 283
Posted By MadeInGermany
Either put your new java path before the...

Either put your new java path before the inherited $PATH
PATH=/usr/sbin:/usr/localcw/sbin:/usr/lib/java8/jre/bin:/usr/java8_64/jre/bin:$PATH:/sbin:/opt/IBM/db2/V9.7/bin
Or, better, look where the...
Forum: Solaris 5 Days Ago
Replies: 10
Views: 402
Posted By MadeInGermany
Please provide the details from the df and mount...

Please provide the details from the df and mount commands:
df /path/of/mountpoint
mount -v | grep /path/of/mountpoint
Forum: AIX 5 Days Ago
Replies: 8
Views: 283
Posted By MadeInGermany
Appends the new java path to the existing PATH. ...

Appends the new java path to the existing PATH.
What is the resulting PATH
echo $PATH
?
Forum: Shell Programming and Scripting 5 Days Ago
Replies: 17
Views: 310
Posted By MadeInGermany
How about awk? awk '{for (i=1; i<=NF; i++) if...

How about awk?
awk '{for (i=1; i<=NF; i++) if ($i==from) $i=to; print}' from=190.169.11.15 to=10.4.112.240 < proxy.log
Or
cat changefile
190.169.11.15 10.4.112.240

awk 'FILENAME!="-"...
Forum: Shell Programming and Scripting 6 Days Ago
Replies: 9
Views: 311
Posted By MadeInGermany
The same idea but implemented with two grep's ...

The same idea but implemented with two grep's
#!/bin/bash
plist=${1//+/$'\n'}
TMP=$(fgrep -vxf <(ps -eo comm= | fgrep -x "$plist") <<< "$plist")
if [ -n "$TMP" ]
then
echo "processes not...
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 9
Views: 311
Posted By MadeInGermany
Yes, ps ax -ocomm=does not list users or...

Yes,
ps ax -ocomm=does not list users or command arguments, so cannot unwantedly show false positives in them.
Even simpler than
ps ax -ocomm= | grep "$PROC"is
pgrep "$PROC"Both provide an exit...
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 4
Views: 242
Posted By MadeInGermany
@rbatte1, I disagree a bit with your post: 1. ...

@rbatte1, I disagree a bit with your post:
1.
spaces in a string are only a problem when word splitting applies, like in command arguments, and [ is a command but [[ is NOT. Word splitting in [[ ...
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 4
Views: 242
Posted By MadeInGermany
The problem is that within [[ ]] the == does a...

The problem is that within [[ ]] the == does a glob match rather than a string comparison.
In your case a \X in the glob pattern becomes a X and that differs.
Therefore, the right side of the ==...
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 6
Views: 338
Posted By MadeInGermany
Pardon? What is PGN? -- Another sed solution...

Pardon? What is PGN?
--
Another sed solution that will save some memory, by only reading the needed lines into the input buffer.
Written as a multi-liner (better readable):
sed '
:loop
/{/{
...
Forum: Solaris 1 Week Ago
Replies: 10
Views: 402
Posted By MadeInGermany
According to This article...

According to This article (https://www.unix.com/solaris/25956-max-size-file.html) and Oracle (https://docs.oracle.com/cd/E19253-01/817-0547/whatsnew-updates-99/index.html) the maximim file size on...
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 291
Posted By MadeInGermany
The regular expression search ~ is different from...

The regular expression search ~ is different from the string search via index.
You'll see differences e.g. with the following input files
A|123|qwer
A|456|tyui
A|45|wsxe
B|789|dfghA|123|qwer...
Forum: HP-UX 1 Week Ago
Replies: 4
Views: 393
Posted By MadeInGermany
Maybe it was available as a patch/package. But...

Maybe it was available as a patch/package.
But lately I do not have access to HP-UX systems, discontinued my HPE account, and have forgotten many things...
You might want to have a look in the...
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 291
Posted By MadeInGermany
The following variant does a precise lookup (to...

The following variant does a precise lookup (to supress duplicates),
and does not need an array of delimiters:
awk '
BEGIN {
FS=OFS="|"
dl=";"
}
function strjoin(i, j){
if (i=="")...
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 3
Views: 299
Posted By MadeInGermany
Is /home/akash/rpil/rpi-build/tmp/ writable by...

Is /home/akash/rpil/rpi-build/tmp/ writable by user root?
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 12
Views: 392
Posted By MadeInGermany
Another solution with shell internals, relying on...

Another solution with shell internals, relying on the alphabetic order of the file names
out=""
for f in *
do
if [[ $f == *.x ]]
then
out=""
else
# append $f to $out (after a...
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 3
Views: 304
Posted By MadeInGermany
last_ip=`cat $last_ip_file`is certainly more...

last_ip=`cat $last_ip_file`is certainly more expensive than
last_ip=$( <$last_ip_file )But in the case it is one line, the following works, too:
read last_ip <$last_ip_fileIt would even allow the...
Forum: UNIX for Advanced & Expert Users 2 Weeks Ago
Replies: 3
Views: 274
Posted By MadeInGermany
Not quite correct (*), but might work in practice...

Not quite correct (*), but might work in practice
find /usr/mysrc -name "*.[ch]" -type f -mtime +365 -exec ls -lt {} +

(*) If the argument list (that is collected by the +) becomes too long for...
Forum: UNIX for Beginners Questions & Answers 2 Weeks Ago
Replies: 7
Views: 242
Posted By MadeInGermany
The fuser command lists the opening processes. If...

The fuser command lists the opening processes. If nothing is listed then the file is not opened.
Example shell script:
pids=`fuser filename 2>/dev/null`
if [ -z "$pids" ]
then
echo "not...
Forum: UNIX for Beginners Questions & Answers 2 Weeks Ago
Replies: 7
Views: 220
Posted By MadeInGermany
Supress showing the zero matches: while read cc...

Supress showing the zero matches:
while read cc
do
c=$(grep -c "^$cc" fileb) &&
echo "$cc - $c times"
done <filea
...
END {for (i in a) if (a[i]) printf("%d - %d times\n", i, a[i])}
'...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 06:51 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?