Search Results

Search: Posts Made By: scj2012
Forum: Programming 09-18-2019
13,528
Posted By scj2012
That does work. Why does it work from the python...
That does work. Why does it work from the python shell without print?

Also I looked at 17.1. subprocess — Subprocess management — Python 2.7.16 documentation...
Forum: Programming 09-18-2019
13,528
Posted By scj2012
That doesn't work etiher. Also the exact same...
That doesn't work etiher. Also the exact same command works with subprocess.check_call. What's weird is the subprocess.check_output works in the python shell but not from the python script.
Forum: Programming 09-18-2019
13,528
Posted By scj2012
That's not going to work. I need the shlex and...
That's not going to work. I need the shlex and even if I didn't have it, it still wouldn't work.
Forum: Programming 09-18-2019
13,528
Posted By scj2012
[Python] - subprocess issue
So I have this basic script, see below

import subprocess
import shlex

command = "gcloud projects list"

subprocess.check_output(shlex.split(command))...
1,794
Posted By scj2012
No, just trying to make so I understand the shift...
No, just trying to make so I understand the shift command. I know I'm going to need it at some point.
1,794
Posted By scj2012
Thank you! But do you know how to do it with...
Thank you! But do you know how to do it with shift?
1,794
Posted By scj2012
Shift command help
#!/bin/bash

hostname=$1; shift

for hostname in $1

do

ping $hostname

done



I want to run the above script as hostname.sh yahoo.com google.com cnn.com. I want to shift each...
4,798
Posted By scj2012
Scott, Is the reason this work this way is...
Scott,

Is the reason this work this way is because the for loop is processing one color at a time before moving to the next color?
4,798
Posted By scj2012
Why is that? I thought code was read from top to...
Why is that? I thought code was read from top to bottom. So why doesn't hitting the first if statement first doesn't matter?

So basically what you are saying is all the code in the for loop code...
4,798
Posted By scj2012
For loop statements order of operations
Say I have a for loop that parse through a file....Say it look for the colors red and blue in sections of the file. Say it find red before it find blue in the file.

Say I have two if statements in...
99,650
Posted By scj2012
This is on the local machine so it would be: ...
This is on the local machine so it would be:

ssh oracle@`localhost`???

Also can I do xhost + then su to oracle?
99,650
Posted By scj2012
Oracle 12c installer - error "DISPLAY not set"
Good evening to all! :-)

Need some help from experinced Oracle users. I am trying to install Oracle 12c to Redhat.

sudo -u oracle

./runInstaller


But installer answered me:

Could not...
1,644
Posted By scj2012
Thanks 100...that's what I needed. Worked...
Thanks 100...that's what I needed. Worked perfectly.
1,644
Posted By scj2012
Here doc question
This is a very simple question.

So I have:

[root@machine1]# cat << 'EOF' > /usr/share/servers/test man EOF

From the command line I want to put "man" into a /usr/share/servers/test. I have...
3,288
Posted By scj2012
Finding SSL Cert Info
How do I find out the SSL cert info on the local server?

How do I know if an ssl cert is installed on local server?

How it was issued to?

Who was the issuer?

What's the expiration date?...
2,110
Posted By scj2012
Understood. But if you are a security administer...
Understood. But if you are a security administer you aren't going to look through every user history file plus it should show up in the ks file.
2,110
Posted By scj2012
Keystroke logging issue
I'm having an issue with keystoke logging. As we know in unix you can press tab to auto-complete a command or whatever it is you are typing. Well keystoke logging in /var/log/ks, tabs are actually...
1,750
Posted By scj2012
That explains a lot. Thanks for all your help.
That explains a lot. Thanks for all your help.
1,750
Posted By scj2012
Thanks. That make sense. Question. Would Pass,...
Thanks. That make sense. Question. Would Pass, Reject and All be part of that expression? Or is it just looking for the values of Pass, Reject and All like ([0-9]*\ and ([0-9]*\ and a-zA-Z]*\?
1,750
Posted By scj2012
Thanks. That's quite helpful. Explain /\1,\2,\3/....
Thanks. That's quite helpful. Explain /\1,\2,\3/. It apear this mean string 1,2 and 3?

So basically whats's going is sed substitute...
1,750
Posted By scj2012
Sed/UNIX help
Can someone explain what this sed statement mean to me?


zcat 2014-04-09.txt.gz | grep -a 'CodeOne:.*CodeTwo=101' | grep -v 'List=Pass' | sed...
1,315
Posted By scj2012
Anyone?
Anyone?
1,315
Posted By scj2012
Perl Script - Sort Columns on webpage
foreach my $ds (sort {
$a->{books} cmp $b->{books} ||
(($a->{books} eq "A") ? ($a->{hammers} cmp $b->{hammers}) :
...
2,475
Posted By scj2012
That helps alot. Can you explain the following......
That helps alot. Can you explain the following...

$ua->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/');

Is there a http and ftp protocol because either protocol could be passed via proxy?
2,475
Posted By scj2012
Actually I copied it wrong. Below is what it...
Actually I copied it wrong. Below is what it should be. Please explain that.


my $tz = LWP::UserAgent->new;
my $proxy = http://website.com
$tz->proxy(['http','https'] => $proxy);
Showing results 1 to 25 of 39

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