Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.10 seconds.
Search: Posts Made By: MadeInGermany
Forum: UNIX for Beginners Questions & Answers Linux 20 Hours Ago
Replies: 6
Views: 330
Posted By MadeInGermany
I call this a trick. Nice somehow, but I am not...

I call this a trick.
Nice somehow, but I am not going to recommend that as a common practice...
Forum: Shell Programming and Scripting Linux 1 Day Ago
Replies: 13
Views: 594
Posted By MadeInGermany
No, it is because .* matches .. and . Test the...

No, it is because .* matches .. and .
Test the glob expansion with echo!
This is for the arguments = start files.
If one of the start files is a directory, chown -R will recurse into it and find...
Forum: UNIX for Beginners Questions & Answers Linux 3 Days Ago
Replies: 6
Views: 330
Posted By MadeInGermany
With a shell glob you need two conditions if [[...

With a shell glob you need two conditions
if [[ -z $lastseen ]] || [[ $lastseen == *[_a-zA-Z]* ]]
then
echo "empty or has an alpha character"
fi
if [[ -z $lastseen ]] || [[ $lastseen ==...
Forum: UNIX for Beginners Questions & Answers Linux 3 Days Ago
Replies: 4
Views: 208
Posted By MadeInGermany
Another solution. The substitution for the two...

Another solution.
The substitution for the two digit is straight forward;
a second substitution cares about the one digit.
ls *.txt | sed '
s/\(.*_\)S\([0-9][0-9]_\)\(.*\)/mv & MID-\2\1\3/...
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 17
Views: 648
Posted By MadeInGermany
I usually consult the man pages man awk ... ...

I usually consult the man pages
man awk
...
man sed
...
Not made for the beginner, but one can get used to it.
Forum: Solaris Linux 4 Days Ago
Replies: 7
Views: 569
Posted By MadeInGermany
Alternatively you can mount NFS with the noquota...

Alternatively you can mount NFS with the noquota option.
Forum: Shell Programming and Scripting Linux 5 Days Ago
Replies: 13
Views: 594
Posted By MadeInGermany
Attention: the SysV chown changes the target of...

Attention: the SysV chown changes the target of symbolic links; normally you want to change the owner of the symbolic links so you need the -h option
(old Linux chown was different, like BSD chown)....
Forum: Shell Programming and Scripting Linux 5 Days Ago
Replies: 5
Views: 224
Posted By MadeInGermany
Or let sed do the global "-" substitution: sed...

Or let sed do the global "-" substitution:
sed '1{ x; s/.*/NAME COUNTRY_CODE/; p; s/[^ ]/-/g; G; }' test.txt
In line 1, save to H-buffer, put the title, print, substitute all non space with "-";...
Forum: Shell Programming and Scripting Linux 6 Days Ago
Replies: 17
Views: 648
Posted By MadeInGermany
Print the previous (stored) lines if s[$0] == 4...

Print the previous (stored) lines if s[$0] == 4 and the current line for s[$0] > 4
awk '{p=$1; $1=""; pid[$0,++s[$0]]=p} s[$0]==4 {for (i=1; i<=s[$0]; i++) print pid[$0,i] $0} s[$0]>4 {print p,$0}'...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 3
Views: 218
Posted By MadeInGermany
Confirmed, overdone optimization has broken GNU...

Confirmed, overdone optimization has broken GNU find. If you have SuSE or RHEL you should open a support ticket.
What can help:
Run find with -noleaf.
If that does not help, run an old find from...
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 6
Views: 250
Posted By MadeInGermany
How are the files organized? Having a million...

How are the files organized?
Having a million files in in one folder can be EXTREMELY slow, dependent on the file system type in the NAS box. And Solaris might cause an additional delay. It makes...
Forum: Homework & Coursework Questions Linux 1 Week Ago
Replies: 10
Views: 567
Posted By MadeInGermany
You certainly meant MIG not RudiC. Anyway, a...

You certainly meant MIG not RudiC.
Anyway, a big thanks for the light on this dark area!
Forum: Homework & Coursework Questions Linux 1 Week Ago
Replies: 10
Views: 567
Posted By MadeInGermany
Sorry, I didn't notice the -t, there :o ...

Sorry, I didn't notice the -t, there :o

Regarding the -k description, it is a bit lengthy in the man pages, and it is not even detailed enough.
For example, I had to find out the hard way that a...
Forum: Homework & Coursework Questions Linux 1 Week Ago
Replies: 10
Views: 567
Posted By MadeInGermany
Further you need to set a suitable field...

Further you need to set a suitable field delimiter.
man sort is your friend.
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 6
Views: 229
Posted By MadeInGermany
And there is no "Linux 7" either. Du you have a...

And there is no "Linux 7" either.
Du you have a CentOS 7.x distro?
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 6
Views: 229
Posted By MadeInGermany
In the good old days we had really secured Sparc...

In the good old days we had really secured Sparc workstations in offices.
A non-default boot (from external media or network) required a boot password.
The default-boot used the internal disk. The...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 17
Views: 648
Posted By MadeInGermany
This produces the output from your last post, but...

This produces the output from your last post, but the first 4 occurrences rather than random 4 occurrences
awk '{p=$1; $1=""; pid[$0,++s[$0]]=p} s[$0]==4 {for (i=1; i<=s[$0]; i++) print pid[$0,i]...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 19
Views: 388
Posted By MadeInGermany
Or the other way round, you are in the source dir...

Or the other way round, you are in the source dir and want to copy to the ../fa/la/ dir
for c in *.xyz
do
cp "$c" "../fa/la/.$c"
done
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 17
Views: 648
Posted By MadeInGermany
Then, instead of the whole line, compare only...

Then, instead of the whole line, compare
only column$2
awk 's[$2]++<4' test.txtor
the whole line($0) but column$1
awk '{x=$0; $1=""} s[$0]++<4 {print x}' test.txt<4 means up to 4 instances are...
Forum: Solaris Linux 1 Week Ago
Replies: 3
Views: 197
Posted By MadeInGermany
boot -s will enter S state (single user). There...

boot -s will enter S state (single user).
There I expect hitting Ctrl-D (or typing exit) to advance to the multi-user state.
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 6
Views: 244
Posted By MadeInGermany
You can use an extra descriptor for reading from...

You can use an extra descriptor for reading from the file.
The stdin=1 default remains where it is (usually /dev/tty but who knows?)
while read -r line <&3
do
echo "$line"
...
done 3<"$1"
Forum: HP-UX Linux 1 Week Ago
Replies: 3
Views: 318
Posted By MadeInGermany
Are there any processes with any of these owners?...

Are there any processes with any of these owners?
ps -fu bin,adm,daemon,uucp,lp,hpdb
These are probably affected.
IMHO, if the login password is locked/invalid, there is not much gain in disabling...
Forum: Shell Programming and Scripting Linux 2 Weeks Ago
Replies: 5
Views: 222
Posted By MadeInGermany
There might be a loop caused by a system csh...

There might be a loop caused by a system csh startup file that runs before the user's .cshrc
For debugging change the shebang to
#!/bin/csh -X
Forum: UNIX for Beginners Questions & Answers Linux 2 Weeks Ago
Replies: 2
Views: 149
Posted By MadeInGermany
With shell builtins (no external command awk,...

With shell builtins (no external command awk, sed, perl)
here is a standard procedure
fn="file.conf"
# split on =, change the certain value, write to .new file:
while IFS="=" read key val
do
...
Forum: Shell Programming and Scripting Linux 2 Weeks Ago
Replies: 6
Views: 207
Posted By MadeInGermany
gsub returns the number of substitutions, not the...

gsub returns the number of substitutions, not the manipulated string.
The latter remains at the given location, here $13
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 10:12 AM.