Search Results

Search: Posts Made By: MadeInGermany
278
Posted By MadeInGermany
Perhaps you can set a default printer-queue with ...
Perhaps you can set a default printer-queue with
lpadmin -d "HPLJ4"?
I think you can list the current default with
lpstat -d
188
Posted By MadeInGermany
I think you expect rename -> prename as is the...
I think you expect rename -> prename as is the case on Debian. Another one with prename:
prename -n 's/^(CMRLPCR\d{6})_[^_]*/$1/' *.bumOr
prename -n 's/_[^_]*//' CMRLPCR??????_*.bum
The rename...
121
Posted By MadeInGermany
awk -F, 'a[$1]++==0' filenameis quick and dirty...
awk -F, 'a[$1]++==0' filenameis quick and dirty because it stores an unnecessary integer value.
The full and efficient code is
awk -F, '!($1 in a) { a[$1]; print }' filenameThat you can condense...
259
Posted By MadeInGermany
Attention, the standard shell and find glob has...
Attention, the standard shell and find glob has [!p] - [^p] is a GNU/libc extension.
(But the latter is standard in RegularExpression.)
480
Posted By MadeInGermany
Well, on the right side of > and < there can be a...
Well, on the right side of > and < there can be a filename, so the & prefix indicates it is a file descriptor.
On the left side it is clear that it's a file descriptor, so the bare number does it....
259
Posted By MadeInGermany
As I suggested, have -name "*.js?*" \! -name...
As I suggested, have -name "*.js?*" \! -name "*.jsp" or cheat with -name "*.js??*".
And most easy is of course -name "*.jsp?*".
259
Posted By MadeInGermany
(@Neo, nothing was really missing. I was able to...
(@Neo, nothing was really missing. I was able to construct the output from the given input sample and the given code. And no error message.)

The * in shell glob and find glob means every - even...
Forum: Linux 3 Days Ago
259
Posted By MadeInGermany
Let me predict what will happen without swap: ...
Let me predict what will happen without swap:
the machine will have spikes of high load, and during the spikes will pause its productive work.
Perhaps it will even invoke the OOM process killer.
...
484
Posted By MadeInGermany
In tr the number of characters in arg1 should...
In tr the number of characters in arg1 should match the number in arg2 - otherwise the behavior is not possible.
Convert directly to newline:
tr -s ' ,!' '\n\n\n' < filename
327
Posted By MadeInGermany
%06s is obviously not portable. On different OS...
%06s is obviously not portable.
On different OS I get different results:
printf "%06s\n" 01140
01140printf "%06s\n" 01140
001140However, never this is seen as a number.

--- Post updated at...
214
Posted By MadeInGermany
Regarding your initial attempt, it is quite...
Regarding your initial attempt, it is quite close.
First, let me make a simplified version:
awk '! ($1 in A_Max) || $1 > A_Max[$1] { A_Max[$1]=$NF } END { for (a in A_Max) print A_Max[a],a }'...
480
Posted By MadeInGermany
2&>1 creates a file named 1 in the current...
2&>1 creates a file named 1 in the current directory.
2>&1 is correct: it redirects descriptor 2 (stderr) to descriptor 1 (stdout). The & makes the following a file descriptor.
And the following |...
375
Posted By MadeInGermany
You can boost your sed attempt sed ' ...
You can boost your sed attempt
sed '
/@inlineifset/,/^ *$/!d
/@inlineifset{mrg, @btpar{@/{
# Delete the previous search pattern
s///
:Loop
# Delete the end pattern; on success go...
Forum: What is on Your Mind? 1 Week Ago
427
Posted By MadeInGermany
Amazing! (Why do I feel a bit frightened?)
Amazing!
(Why do I feel a bit frightened?)
305
Posted By MadeInGermany
logrotate is awful. man logrotatedoes not well...
logrotate is awful.
man logrotatedoes not well enough clarify boarder cases.
Try to add
sharedscripts
This ensures that the postrotate action occurs once.
It work as well (or even better) to...
484
Posted By MadeInGermany
You mean the extra line? I guess there is a...
You mean the extra line?
I guess there is a space character after the server3; this extra space is converted to an extra newline.
404
Posted By MadeInGermany
Homework? According to the rules of this forum...
Homework?
According to the rules of this forum you must put a homework question in the sub forum "Homework and Emergencies" -> "Homework & Coursework Questions".
You find it further down the The...
484
Posted By MadeInGermany
Including a space in the [ ] is okay but there is...
Including a space in the [ ] is okay but there is also (at least) one following space.
So either have /[,.!? ] */ i.e. a following space is not required; this would also cover...
404
Posted By MadeInGermany
The ~ expands to an absolute path. If your tar is...
The ~ expands to an absolute path. If your tar is not GNU tar, then the leading / is not stripped off. And a relocation during extraction is impossible.
I would use cd and let the shell expand the...
404
Posted By MadeInGermany
How did you produce your tar file? What is its...
How did you produce your tar file?
What is its contents? tar -tf testtar.tar
86
Posted By MadeInGermany
Yes, QEMU is a virtual machine. sys1=`prtdiag |...
Yes, QEMU is a virtual machine.
sys1=`prtdiag | awk -F: '$1=="System Configuration" {print $2} NR>5 {exit}'`
case $sys1 in
*QEMU*) echo "QEMU (KVM-based on a Linux host)";;
*VM[Ww]are*) echo...
Forum: Shell Programming and Scripting 2 Weeks Ago
365
Posted By MadeInGermany
You can consolidate egrep -v '^#' /etc/oratab |...
You can consolidate
egrep -v '^#' /etc/oratab | egrep -v '^$'into
egrep '^[^#]' /etc/oratabAnd the whole thing into awk
awk -F: '/^[^#]/ && !/^listener/ {print $1}' /etc/oratab |
while read...
76
Posted By MadeInGermany
You can let the system go in then two levels out ...
You can let the system go in then two levels out
echo "$abc/../.."
Or strip two levels from the end of the pathname (this is a pure string manipulation)
echo "${abc%/*/*}"
Forum: Shell Programming and Scripting 2 Weeks Ago
390
Posted By MadeInGermany
I guess you have a wrong perception how the...
I guess you have a wrong perception how the pruning works.?
-prune stops descending directories at the current point.
When it is preceded by a condition that becomes true for a directory, then that...
Forum: Shell Programming and Scripting 2 Weeks Ago
574
Posted By MadeInGermany
I cannot recommend the C-shell at all. My own...
I cannot recommend the C-shell at all.
My own experience is, it is sufficient for the command line, but it is full of bad surprises if you are going to write longer scripts.
The Internet is full of...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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