Search Results

Search: Posts Made By: scj2012
Forum: Programming 09-18-2019
11,483
Posted By Yoda
To see the output from program, you have to print...
To see the output from program, you have to print the output. I believe stdout is used internally for this function:-

print subprocess.check_output(shlex.split(command))
1,252
Posted By Don Cragun
No shifts necessary... for hostname in "$@" ...
No shifts necessary...
for hostname in "$@"
do ping "$hostname"
done
3,213
Posted By Scott
Yes. It works this way because you are reading a...
Yes. It works this way because you are reading a file (sequentially) and processing it as it comes.

if you find red, process that
if you find blue, process that

Yields the same results as
...
97,836
Posted By xabbu
Hi, ssh normally will not forward X! ...
Hi,

ssh normally will not forward X!

Try


ssh -X oracle@localhost


Regards,

xabbu
97,836
Posted By MadeInGermany
ssh oracle@localhost works but can create a...
ssh oracle@localhost works but can create a problem with known_hosts in a shared home directory.
Try the ssh method first, before you try the xhost,sudo method!
97,836
Posted By MadeInGermany
The xhost + only works if the display still works...
The xhost + only works if the display still works i.e. before the su or sudo. And it opens your display for everyone until you do xhost -.
Instead of su|sudo+xhost maybe you can do ssh that normally...
1,325
Posted By RudiC
man bash: So - the EOF string needs to be...
man bash:

So - the EOF string needs to be on a line of its own. As does the word man, btw.
2,898
Posted By gull04
Hi, You should be able to find most of the...
Hi,

You should be able to find most of the information using "openssl" for the exact syntax and all the switches run,
[/etc]
(23:57:50)-(annemunro)-(4883)-> openssl
OpenSSL> ?
openssl:Error:...
1,822
Posted By RudiC
Whatever was autocompleted, if you run it, it...
Whatever was autocompleted, if you run it, it will be in your history file.
1,633
Posted By Don Cragun
In the basic regular expression specifying the...
In the basic regular expression specifying the search pattern in the sed substitute command:
s/^.*Pass=\([0-9]*\),.*Reject=\([0-9]*\),.*All=\([a-zA-Z]*\),.*$/\1,\2,\3/
are Pass=, Reject=, and All=...
1,633
Posted By Don Cragun
\1 in the replacement string in the sed...
\1 in the replacement string in the sed substitute command is replaced by the set of characters matched by expression in the 1st \(expression\) in the basic regular expression used in the sed...
1,633
Posted By Don Cragun
Change any input line that matches: ...
Change any input line that matches:
arbitraryPASS=digits,arbitraryReject=digits,arbitraryAll=letters,arbitraryto a line of the form:
digits,digits,letters
2,240
Posted By balajesuri
Look at this link...
Look at this link (http://search.cpan.org/~gaas/libwww-perl-6.05/lib/LWP/UserAgent.pm#Proxy_attributes).
2,240
Posted By balajesuri
From what I know, there is no sub-routine 'site'...
From what I know, there is no sub-routine 'site' in the LWP::UserAgent module, available in CPAN. Are you using a custom built variant of this module?
2,240
Posted By balajesuri
$tz is a reference variable that refers to the...
$tz is a reference variable that refers to the object obtained by blessing some package. site is a sub-routine (object method) in that package to which you're sending two arguments (as a list) viz....
2,240
Posted By elixir_sinari
Technically, the -> is a binary infix dereference...
Technically, the -> is a binary infix dereference operator. In your case, since the right side of the operator is neither an array/hash subscript nor a subroutine argument list, it implies a method...
2,240
Posted By DGPickett
First, I know almost no perl, but that never...
First, I know almost no perl, but that never stops me!

-> is stolen from C, says point to a child member of, in this case a member function or method of a class/object/struct type.

=> is...
2,630
Posted By bakunin
True. The other plausible explanation is that the...
True. The other plausible explanation is that the writer of this intended to search a file named "server.log" for a string/regexp he just forgot to write. This would mean the statement is equally...
2,630
Posted By alister
Looks like a hack to print all lines after and...
Looks like a hack to print all lines after and including the first to match 'server.log' and then count those with Option=[Yes]. It assumes that the number of lines left in the file will be less than...
8,871
Posted By hanson44
Sure. The right dot means "any single character",...
Sure. The right dot means "any single character", and * means "zero or more of preceding thing". So .* means "zero or more of any character". And each of the zero or more can be a different...
8,871
Posted By hanson44
Yes. On each line, sed deletes (substitutes...
Yes. On each line, sed deletes (substitutes nothing for) the leftmost dot (period) and the remainder of the line.
$ cat test.txt
.
abc.asfasfsadf
abc.abc.asfasdfa
abcabcddd
$ sed 's/[.].*//'...
1,470
Posted By Yoda
i=$( grep Multiple "test.`date...
i=$( grep Multiple "test.`date +%Y%m%d`-${hour}3101.txt" )
The curly brace form is unambiguous as the variable name is clearly delimited.
1,470
Posted By vgersh99
echo 'Wed Apr 3 10:39:30 EDT 2013' | awk -F'[...
echo 'Wed Apr 3 10:39:30 EDT 2013' | awk -F'[ :]' '{print $4}'
date +%H
1,470
Posted By Yoda
You can simply run date with format control to...
You can simply run date with format control to get hour:
date +%H
1,470
Posted By Yoda
Use command substitution...
Use command substitution (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03) $(..)
hour=$(date +%H -d "1 hour ago")
Showing results 1 to 25 of 26

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