Search Results

Search: Posts Made By: Scrutinizer
136
Posted By Scrutinizer
You need to use double quotes, rather than single...
You need to use double quotes, rather than single ones in this case. Shell variables inside single quotes do not get expanded.
177
Posted By Scrutinizer
Hi, it does not work that way. Instead try: ...
Hi, it does not work that way. Instead try:
oflnb=${oflna%.*}
851
Posted By Scrutinizer
Not sure if this applies here. One time I came...
Not sure if this applies here. One time I came across a excessive load pattern with no increase of cpu and io, was when there were a lot of processes in uninterruptible sleep state (D), which...
327
Posted By Scrutinizer
Ah I see OK By the way I suggested "%6s"...
Ah I see OK

By the way I suggested "%6s" rather than "%6d" to avoid the octal thing...
327
Posted By Scrutinizer
A quick note to add: numbers=$(printf "%6s"...
A quick note to add:
numbers=$(printf "%6s" $number)
numbers=${numbers// /0}
could also be combined as:
numbers=$(printf "%06s" "$number")
Forum: What is on Your Mind? 5 Days Ago
551
Posted By Scrutinizer
Thank Neo, for this great honour and your kind...
Thank Neo, for this great honour and your kind words!

I agree that there are many who deserve this title and I feel honoured to be among them..

I am glad to be part of this wonderful community...
375
Posted By Scrutinizer
Try this adaptation of RudiC's suggestion: ...
Try this adaptation of RudiC's suggestion:

awk '
/@inlineifset/ {
if(/@btpar/) {
$1 = $1
gsub(/@inlineifset{mrg, @btpar{@|,,,,}}/, "")
}
print
}
' RS=...
382
Posted By Scrutinizer
Using RudiC's suggestion of -M , using GNU sort ...
Using RudiC's suggestion of -M , using GNU sort
sort -k4n -k1,1M -k2,3n file
Would complete the sort.
338
Posted By Scrutinizer
Good to hear the suggestion seems to work out for...
Good to hear the suggestion seems to work out for you :)
Let me explain what it means:
while ( ytd_date !~ /^[01][0-9][0-3][0-9][901][0-9]$/ ) {
This is a so-called "regular expression" , which...
338
Posted By Scrutinizer
Hi, Try changing: while ( ytd_date !~...
Hi,

Try changing:
while ( ytd_date !~ /^[01][0-9][0-3][0-9][901][0-9]$/ ) {
into
while ( ytd_date !~ /^[01][0-9][0-3][0-9][0-9][0-9]$/ ) {
and try and test if that might work out for you...
255
Posted By Scrutinizer
To get just the filename you can use ${f##*/}...
To get just the filename you can use ${f##*/} instead of $f (within double quotes)
Forum: Shell Programming and Scripting 2 Weeks Ago
365
Posted By Scrutinizer
Hi, a pipe appears to be missing: egrep -v...
Hi, a pipe appears to be missing:
egrep -v '^listener' |\
633
Posted By Scrutinizer
Hi some quick thought on the last code snippet: ...
Hi some quick thought on the last code snippet:
In awk the middle section is processed per line, so you should leave out:
for(i=1;i<=NR;i++)
The results should be stored in arrays so they can be...
400
Posted By Scrutinizer
Can you specify what does not work? The message...
Can you specify what does not work? The message presented is just a warning caused by the unnecessary backslash before the semicolon, but it should not change the outcome.
488
Posted By Scrutinizer
Here are some more alternatives to try: Use...
Here are some more alternatives to try:

Use a here string
read var1 var2 <<< "$(openstack hypervisor stats show | awk -F'|' 'NR==14{print $2,$3}')"
Use a here document
read var1 var2 << EOB
...
506
Posted By Scrutinizer
Try: xargs -n3 < file You can experiment by...
Try:
xargs -n3 < file
You can experiment by varying the number and see what it does.
Forum: Shell Programming and Scripting 2 Weeks Ago
435
Posted By Scrutinizer
There is a syntax error in the awk code: if(...
There is a syntax error in the awk code:
if( substr($0,1,1) == comment || if( substr($0,1,2) == comment )
should probably be
if( substr($0,1,1) == comment || substr($0,1,2) == comment )
384
Posted By Scrutinizer
To keep the forums high quality for all users,...
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read...
507
Posted By Scrutinizer
Hi, What OS and version are you using? ...
Hi,

What OS and version are you using?
What does your file look like?
What is the exact message?
211
Posted By Scrutinizer
Hi, Looking at this snippet: xyz="$abc" ...
Hi,

Looking at this snippet:
xyz="$abc"
status=$?
$? will always be true (0) since the previous command is xyz="$abc" which is a variable assignment, which will always be successful..
Forum: Shell Programming and Scripting 3 Weeks Ago
237
Posted By Scrutinizer
And what is the command?
And what is the command?
Forum: Shell Programming and Scripting 3 Weeks Ago
237
Posted By Scrutinizer
What is your OS and version. Can you show the...
What is your OS and version.
Can you show the exact command?
Forum: Shell Programming and Scripting 3 Weeks Ago
237
Posted By Scrutinizer
Classes like [:ascii:] and [:word:] are non-POSIX...
Classes like [:ascii:] and [:word:] are non-POSIX additional classes that can be found in perl, but are not recognised by standard sed.

Instead of [:ascii:], with GNU sed you could try a regex...
315
Posted By Scrutinizer
If I do this : grep -E 'System Capabilities:...
If I do this :
grep -E 'System Capabilities: |System Desc' output.txt
Then I get:
System Description:
System Capabilities: B
System Description:
System Capabilities: B
System Description: ...
524
Posted By Scrutinizer
The second query is from clients where both IPv4...
The second query is from clients where both IPv4 and IPv6 are enabled. If you do not want the second query on a client and you are only using IPv4, try disabling IPv6 on that particular client.
Showing results 1 to 25 of 500

 

Featured Tech Videos

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