Sponsored Content
Full Discussion: Python Combing Two Commands
Top Forums Shell Programming and Scripting Python Combing Two Commands Post 302948002 by metallica1973 on Wednesday 24th of June 2015 03:15:56 PM
Old 06-24-2015
Thanks for the reply. Awesome advice but after playing around with it, I did a small modification and came up with but not exactly a one-liner:
Code:
In [201]: kbfileurl = re.search('<p>For more information about this update.*</p>', tbull.text.encode('utf8')).group()

In [202]: kbfileurl
Out[202]: '<p>For more information about this update, see <a href="https://support.microsoft.com/kb/3020393">Microsoft Knowledge Base Article 3020393</a>.</p>'

In [203]: kburl = re.search(r'\bhttps://support.microsoft.com/kb/\d+\b', kbfileurl).group(0)

In [204]: kburl
Out[204]: 'https://support.microsoft.com/kb/3020393'

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Exec. commands in python

How would i do if i'd want to execute a command in a python script or programme ? (1 Reply)
Discussion started by: J.P
1 Replies

2. Red Hat

Writing simple python setup commands

Building software in most languages is a pain. Remember ant build.xml, maven2 pom files, and multi-level makefiles? Python has a simple solution for building modules, applications, and extensions called distutils. Disutils comes as part of the Python distribution so there are no other packages... (0 Replies)
Discussion started by: Linux Bot
0 Replies

3. Shell Programming and Scripting

a tip in python commands >> and <<

q = ((i + 2) * 6) >> 3 what's the meaning in python? (3 Replies)
Discussion started by: kazikamuntu
3 Replies

4. Shell Programming and Scripting

combing two lines

Hi list, I have to combine two lines and adding the " - " in between. So: Here's sentence A Here's Senctence B Here's sentence A - Here's Senctence B I know how to us SED: sed '$!N;s/\n/ /' for combining tow lines. But how do I insert the " - " correctly? Thanks! Martijn (os... (4 Replies)
Discussion started by: M474746
4 Replies

5. Shell Programming and Scripting

[Solved] How to create a script by combing two files?

I am trying to generate a csv file for utilization of each project directory. there are 10 filesystem and for each filesystem there are 16 directory. i was trying to create a script so i created two file. one is filesystem and one is project. so file looks like cat filesystems /app1 /app2... (10 Replies)
Discussion started by: anshu ranjan
10 Replies

6. Shell Programming and Scripting

How to combing output of cut commands with a delimiter?

While looping through a file, I am cutting different length of characters (based on their length) like columns and want to produce the output in a separate file with different columns being separated by a comma. How to achieve this with an online command. I don't want to create multiple variables... (8 Replies)
Discussion started by: mady135
8 Replies

7. Shell Programming and Scripting

**python** unable to read the background color in python

I am working on requirement on spreadsheet in python scripting. I have a spreadsheet containing cell values and with background color. I am able to read the value value but unable to get the background color of that particular cell. Actually my requirement is to read the cell value along... (1 Reply)
Discussion started by: giridhar276
1 Replies

8. Windows & DOS: Issues & Discussions

How to execute python script on remote with python way..?

Hi all, I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine.. Below is the code I am trying: #!/usr/bin/env python import wmi c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies

9. Programming

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

Hi all... As you know I like making code backwards compatible for as many platforms as possible. This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies
PTS_LISTENTRIES(1)					       AFS Command Reference						PTS_LISTENTRIES(1)

NAME
pts_listentries - Displays all users or groups in the Protection Database SYNOPSIS
pts listentries [-users] [-groups] [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts liste [-u] [-g] [-c <cell name>] [-n] [-l] [-f] [-h] DESCRIPTION
The pts listentries command displays the name and AFS ID of all Protection Database entries of the indicated type. It also displays the AFS ID of each entry's owner and creator. To display all user and machine entries, either include the -users flag or omit both it and the -groups flag. To display all group entries, include the -groups flag. To display all entries, provide both flags. OPTIONS
-users Displays user and machine entries. -groups Displays group entries. -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). OUTPUT
The output includes a line for each entry, with information in four columns that have the following headers: Name The entry's name. ID The entry's AFS ID (AFS UID for a user or machine, negative AFS GID for a group). Owner The AFS ID of the user or group that owns the entry. Creator The AFS ID of the user who created the entry (the system:administrators group is listed as the creator of the entry for "anonymous" and the system groups, but it is not otherwise possible for a group to create groups). In general, the entries appear in the order in which they were created. EXAMPLES
The following example displays both user and group entries. % pts listentries -users -groups Name ID Owner Creator system:administrators -204 -204 -204 system:anyuser -101 -204 -204 system:authuser -102 -204 -204 anonymous 32766 -204 -204 admin 1 -204 32766 pat 100 -204 1 smith 101 -204 1 pat:friends -206 100 100 staff -207 -204 1 PRIVILEGE REQUIRED
The issuer must belong to the system:administrators group. SEE ALSO
pts(1), pts_creategroup(1), pts_createuser(1), pts_examine(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2014-04-08 PTS_LISTENTRIES(1)
All times are GMT -4. The time now is 01:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy