Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: Scrutinizer
1,146
Posted By Scrutinizer
Hi, try: grep "^${disk1} " -o...
Hi, try:
grep "^${disk1} " -o --max-count=1
1,388
Posted By Scrutinizer
Try: awk -F, '$3=="bcd"{$0=$0 FS...
Try:
awk -F, '$3=="bcd"{$0=$0 FS substr($NF,4,1)}1' file
2,996
Posted By Scrutinizer
Explanation
You're welcome..

Awk is somewhat unique in the sense that it allows you to specify a different record separator, other than the typical newline, which is absent in your case.

By specifying a...
2,996
Posted By Scrutinizer
Unix utilities typically need a linefeed at the...
Unix utilities typically need a linefeed at the end of the line. You could try awk:

awk '/test12-42213.devserver.com/,/EndTime/; END{printf "\n"}' RS=, ORS=, file
or
awk -v...
1,047
Posted By Scrutinizer
Why single line? Another croc to try: awk...
Why single line? Another croc to try:
awk 'NR>2{e="N"; exit 1} END{printf "##### THE LOTC cluster state IS %sOK ##########\n",e}' file
526
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.
1,896
Posted By Scrutinizer
Hi, it does not work that way. Instead try: ...
Hi, it does not work that way. Instead try:
oflnb=${oflna%.*}
8,671
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...
Forum: What is on Your Mind? 02-13-2020
4,270
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...
9,654
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=...
2,094
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.
1,764
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...
1,764
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...
11,475
Posted By Scrutinizer
Hi, a pipe appears to be missing: egrep -v...
Hi, a pipe appears to be missing:
egrep -v '^listener' |\
1,924
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
...
2,493
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.
6,933
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...
729
Posted By Scrutinizer
Hi, try: awk -F, 'NF>5' file It prints lines...
Hi, try:
awk -F, 'NF>5' file
It prints lines where the number of fields (NF) is more than 5, using a comma as a field separator (-F,)
3,381
Posted By Scrutinizer
That is because the find command produces a list...
That is because the find command produces a list of files, but wc -l turns it in just a count (number). Also the information is not being transferred to the mail command.

You could try something...
7,213
Posted By Scrutinizer
Try this instead: s|(.*)/|$1/.|
Try this instead:
s|(.*)/|$1/.|
7,213
Posted By Scrutinizer
If you use this: s/^/\./ Then the . is added...
If you use this:
s/^/\./
Then the . is added at the beginning of the path.
To add it to the last item in the path, try:
s|.*/|$0/.|
7,213
Posted By Scrutinizer
Hi, in order for xargs to use NUL character...
Hi,

in order for xargs to use NUL character as separator, the utility before the pipe needs to produce them.

try:

mdfind -0 -onlyin . "Note" | xargs -0 -I {} echo {}
or
tag -0 -f "Note" ....
Forum: What is on Your Mind? 01-24-2020
5,697
Posted By Scrutinizer
Congratulations Victor and Ravinder! Well and...
Congratulations Victor and Ravinder! Well and truly earned, both of you in different, valuable ways. Thank you for your contributions!
8,282
Posted By Scrutinizer
Hi, try sort -t_ -k1,3 -k4n
Hi, try
sort -t_ -k1,3 -k4n
2,670
Posted By Scrutinizer
Not sure what you are looking for. You could pipe...
Not sure what you are looking for. You could pipe the result into a while-read loop and use shell variables to compose your command.

jq -r '.name + ";" + .description'...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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