Search Results

Search: Posts Made By: Corona688
522
Posted By Corona688
I'd start with find /lib* /usr/lib* -iname...
I'd start with find /lib* /usr/lib* -iname '*qt*.so*'

Faling that, ldd some-program-that-uses-qt
Forum: Shell Programming and Scripting 3 Weeks Ago
725
Posted By Corona688
BASH allows you to use the basic TTY properties...
BASH allows you to use the basic TTY properties to establish timeouts and read minimums:

#!/bin/bash

# Timeout is 1/10 of a second, minimum read is 0 characters
stty -icanon min 0 time 1
...
138
Posted By Corona688
There's no point using cut inside awk. ...
There's no point using cut inside awk.

out_value=substr($1,9,3)

...but for the record you could use backticks, variable=`command`; ...at a very large performance cost.
Forum: Shell Programming and Scripting 3 Weeks Ago
684
Posted By Corona688
Another way that doesn't need externals, arrays,...
Another way that doesn't need externals, arrays, loops, or backticks:

INPUT="string'delimited'with'quotes"
OLDIFS="$IFS" ; IFS="'"
printf "%s\n" $INPUT
IFS="$OLDIFS"
799
Posted By Corona688
I think access time includes reads too, if its...
I think access time includes reads too, if its enabled. But its been so long since I've seen a system that had atimes enabled, I'm not 100% positive.

Unless you know for a fact atimes are enabled...
209
Posted By Corona688
For that matter, there's already return values...
For that matter, there's already return values here you aren't checking.

function2()
{
cat test.txt # If this fails, $? will be nonzero
}

if ! function2
then
echo "Could...
Forum: Programming 08-09-2019
1,110
Posted By Corona688
"Dying" is hyperbole. By that metric I'm sure...
"Dying" is hyperbole. By that metric I'm sure awk has been dead for half a century. It still persists where its feature set is useful, as does Perl.

One thing that makes Perl especially useful...
1,302
Posted By Corona688
#!/bin/bash MIN=1 MAX=10 STARS=0 ...
#!/bin/bash

MIN=1
MAX=10
STARS=0

S=$(printf '%*s' "$((MAX*2))" '')
D=${S// / *}

for ((N=MIN; N < (MAX*2); N++ && (STARS += W)))
do
[ "$N" -gt "$MAX" ] && W=$(((MAX*2)-N)) ||...
1,195
Posted By Corona688
If you have locate installed, this should find it...
If you have locate installed, this should find it efficiently:
locate 'partoffilename'
If you don't, and really want to do a brute-force search of the entire system, bar nothing and nobody:
find /...
1
awk
83
Posted By Corona688
Please use code tags for code, icode is for...
Please use code tags for code, icode is for single-line things.

awk syntax is very compact because it has its own built in loop and shortcuts.

A simple awk program might look like:
awk...
927
Posted By Corona688
You've got an extra quotation mark in there: ...
You've got an extra quotation mark in there:
mailx -s "Possible Redo Apply Issue at $ORACLE_SID - Log Gap is "$GAPNUM" $MAIL_TO < $OUTFILE
Which might be swallowing up quite a bit of code below it.
879
Posted By Corona688
$ awk -v...
$ awk -v RS="--------------------------------------------------------\n" -v FS="\n" '/Status:[ ]+[ABD-Z]/ { print RS,$0,RS }' input

--------------------------------------------------------
...
1,510
Posted By Corona688
The new way: <span style='color:...
The new way: <span style='color: blue;'>Hello</span>
The old way: <font color="blue">Hello</font>
The new way is preferred, but some old email clients might want the old way.
1,566
Posted By Corona688
Then I would suggest posting a sample of what...
Then I would suggest posting a sample of what that looks like so we can contemplate ways to deal with it. Post what it looks like in the tool, and the actual arguments the shell receives.

OP's...
1,812
Posted By Corona688
Something like # config for systemd ... ...
Something like # config for systemd
...
ExecStart=/path/to/collector2.sh
...

where collector2.sh is #!/bin/bash

. $HOME/.pgprofile_pgwatch2
# Redirect standard output into logfile
exec >>...
1,201
Posted By Corona688
I don't think you should specify "WITHIN GROUP"...
I don't think you should specify "WITHIN GROUP" more than once, that restriction would end up applying to all columns, put it at the end.
1,812
Posted By Corona688
I think systemd considers it dead because the...
I think systemd considers it dead because the scripts run in background, and the foreground process quits. systemd would do its own tracking of PIDs. At the least you'd need to inform systemd what...
1,139
Posted By Corona688
You need to watch your quotes and escaping. In...
You need to watch your quotes and escaping. In PHP this is all one big double-quoted section, and any double quotes inside it must be escaped so they don't end early.

<?php
$output =...
1,782
Posted By Corona688
There isn't one because gzip does not work that...
There isn't one because gzip does not work that way.

We are not being obtuse or blocking you -- gzip doesn't work that way. gzip holds one and only one filename.

This may be counterintuitive...
1,461
Posted By Corona688
gzip will not do this. Ever. It is not zip. It...
gzip will not do this. Ever. It is not zip. It is not a container that holds multiple files.

You can make a tar file, perhaps, which would contain all three files, and gzip the tar file. ...
160
Posted By Corona688
ls ??[0-9]*
ls ??[0-9]*
125
Posted By Corona688
If your input is tab-separated: awk -F"\t" '{...
If your input is tab-separated:
awk -F"\t" '{ if(NF>M) M=NF; for(N=1; N<=NF; N++) if($N) D[N,++C[N]]=$N } END { for(N=1; N<=M; N++) for(X=1; X<=C[N]; X++) print D[N,X] }' inputfile > outputfile
338
Posted By Corona688
I dealt with something like this before. I had...
I dealt with something like this before. I had to add an extra column, which held the line number, like:

1 101 100 1
1 001 200 2
1 002 100 3

...so that I could give that column number to...
113
Posted By Corona688
Bumping up posts or double posting is not...
Bumping up posts or double posting is not permitted in these forums.

Please read the rules (https://www.unix.com/misc.php?do=cfrules), which you agreed to when you registered, if you have not...
Forum: Programming 04-24-2019
662
Posted By Corona688
You can access raw memory contents that way, but...
You can access raw memory contents that way, but /proc/ won't tell you a thing about the symbols in it, just what address space the process owns.

Shared libraries and symbol lookup have changed a...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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