Search Results

Search: Posts Made By: MadeInGermany
120
Posted By MadeInGermany
In order to name a file with special characters,...
In order to name a file with special characters, ecape each special character with a \
The \ is a special character itself.
For the string "\?$*' (6 charcters) you enter \"\\\?\$\*\' (12...
493
Posted By MadeInGermany
The previous did not work for me. Perhaps...
The previous did not work for me.
Perhaps because of the mistake that a test buffer makes assumptions about the contents that can go wrong.
Better have a separate state variable (here: buffer_on)...
179
Posted By MadeInGermany
Does not work with all tr versions, because each...
Does not work with all tr versions, because each character,range,class in arg1 should match a character,range,class in arg2.
The following is portable:
echo "HiringManager_RHMC,...
237
Posted By MadeInGermany
I think you have ksh-88. You can augment your...
I think you have ksh-88.
You can augment your script(s) with a wrapper function (located somewhere at the beginning):
set_A(){
typeset varname=$1
shift
if [ "$BASH" ]
then
eval "$varname=(...
357
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
255
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...
179
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...
324
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.)
543
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....
324
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?*".
324
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 5 Days Ago
282
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.
...
543
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
388
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...
266
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 }'...
543
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 |...
432
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
479
Posted By MadeInGermany
Amazing! (Why do I feel a bit frightened?)
Amazing!
(Why do I feel a bit frightened?)
359
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...
543
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.
455
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...
543
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...
455
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...
455
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...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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