03-16-2020
I see that "text" is basically a dictionary. So you can convert the object type from str to dict; loop over the keys and print only the key-value pairs you need.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everybody.
I have lines that looks something like this:
<done16=""118"" done18=""$ title=""thisisatitle"" href=""/JoeBanana" alt=""Joe""><done16=""118"" done18=""$ title=""thisisatitle"" href=""/GeraldGiraffe" alt=""Gerald"">
What kind of SED command would I need to use to extract... (4 Replies)
Discussion started by: digi
4 Replies
2. Shell Programming and Scripting
for example, I have an html file, contain
<a href="http://awebsite" id="awebsite" class="first">website</a>and sometime a line contains more then one link, for example
<a href="http://awebsite" id="awebsite" class="first">website</a><a href="http://bwebsite" id="bwebsite"... (36 Replies)
Discussion started by: 14th
36 Replies
3. Shell Programming and Scripting
there is a text file like this
text here
text here
text here
text here
USER=someusername here
text here
text here
text here
how can i extract the someusername from this file which has a path like /home/myfile.txt?
i want to store it in a variable $u (3 Replies)
Discussion started by: vanessafan99
3 Replies
4. UNIX for Dummies Questions & Answers
Here is what I have so far:
find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}'
Here is an example content of a PHP or HTM(HTML) file:
<iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Discussion started by: striker4o
18 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I want to launch "ex: http://gmail.com" from the cmd window and validate the credentials with username and password, is it possible?
I have found something like this
"wget --http-user=USER' --http-password=PASSWORD http://gmail.com" am new to this and unable to find a solution, i... (0 Replies)
Discussion started by: harsha85
0 Replies
6. UNIX for Dummies Questions & Answers
Hey guys,
I am trying to send email to the usernames listed in a ascii file. I know about the .mailrc file. I want to know if I there is a way to extract the usernames from a file and email them. I tried something like this:
mailx -s "subject" '~cat... (2 Replies)
Discussion started by: Nirav4
2 Replies
7. Shell Programming and Scripting
I setup Zoneminder and have been playing around with setting up a couple of Wanscam PTZ ip cameras in which I have been running into road blocks with streaming and etc. I cant find much information on the camera and its webserver that sits on it and wanted to get a an absolute directory structure... (5 Replies)
Discussion started by: metallica1973
5 Replies
8. Shell Programming and Scripting
Hi All,
I am new to Shell scripting,
I want to connect to DB2 database through URL,username and password
Please help me out.
I read so many posts in that there is no where it is mentioned about how to connect to a remote database.
Thanks in advance :) (0 Replies)
Discussion started by: Rohit G
0 Replies
9. Shell Programming and Scripting
I am writing a little python script that needs to grab version numbers between "<td>4.2.2</td>" within the tbody of the page:
blah blah blah blah blah
Is it possible to use a one-liner to scrap only the digits between the tags:
"<td>4.2.2</td>"
so it spits out:
4.2.2
4.2.1
etc..... (2 Replies)
Discussion started by: metallica1973
2 Replies
10. Programming
using BeautifulSoup
how can i get the txt between all the
> </a>
example
>The Student .mp4</a>
thanks (10 Replies)
Discussion started by: bob123
10 Replies
LEARN ABOUT DEBIAN
python-mkdebian
PYTHON-MKDEBIAN(1) User Commands PYTHON-MKDEBIAN(1)
NAME
python-mkdebian - Generate a suitable Debian source package for a standard distutils application
SYNOPSIS
python-mkdebian [options]
DESCRIPTION
This script generates a reasonably Debian Policy compliant Debian source package for a Python application that uses distutils properly. It
assumes that there are no public Python modules, and generates just a single application binary package.
Information is taken from setup.py's generated .egg-info file: author, project name, description, version, upstream source, license, and
required and provided Python modules (which are translated to Debian python library package names, and automatically added as package
dependencies).
It generates a simple cdbs/python-support rules file.
python-mkdebian was designed to be used with the DistUtilsExtra.auto module, which calculates required Python dependencies automatically.
However, it makes no explicit assumptions about DistUtilsExtra, so if setup.py has complete information it will work with any distutils
setup.
OPTIONS
--force-control=FORCE_CONTROL
Force control file behaviour. Can be one of "none" (keep unchanged), "deps" (only update dependencies), or "full" (recreate whole
file). By default only dependencies will be updated ("deps").
--force-copyright
Force whole copyright file to be recreated. By default it will not touch an already existing copyright file, so that you can custom-
ize them.
--force-rules
Force whole rules file to be recreated. By default it will not touch an already existing rules file, so that you can customize them.
--changelog=CHANGELOG
Add changelog entry to debian/changelog (can be specified multiple times)
--dependency=PACKAGENAME
Add additional debian package dependency (can be specified multiple times)
--prefix=PREFIX
Ask for installing all your modules in the dedicated PREFIX (default is /usr)
--version
Show program's version number and exit
-h, --help
Show this help message and exit
SEE ALSO
Python help for the distutils module
AUTHOR
python-mkdebian is developed by Martin Pitt <martin.pitt@ubuntu.com>.
python-mkdebian May 2010 PYTHON-MKDEBIAN(1)