10 More Discussions You Might Find Interesting
1. Programming
I have a list as follows:
From this i need to grep the element using keyword as "primary" and return output as
12:13-internet-wifi-primary
i used as follows
if (i <= (len(system_info))):
ss = system_info
print... (5 Replies)
Discussion started by: Priya Amaresh
5 Replies
2. Shell Programming and Scripting
Hello!
#!/usr/bin/env python
hn = "simsa-svr"
for container in containerslist:
Name = container
I want to print Name along with hn i,e simsa-svr. I tried like Name = container'-'.join(hn) did not work.
Needed result: lilly2232321-simsa-svr (2 Replies)
Discussion started by: ashokvpp
2 Replies
3. Post Here to Contact Site Administrators and Moderators
Is it just me or are the links to LinkedIn on the "Members" list not working any more? Clicking on Facebook, YouTube, etc work just fine.
I'm getting a 404 error (page no longer exists) but I know for sure that my page is there. Perhaps there's something wrong with my browser? Any ideas? (7 Replies)
Discussion started by: hicksd8
7 Replies
4. Programming
Here is a snippet of my code:
blahblahblah...
blah
for link in goodies.soup.find_all('a'):
blah.append(link.get('href'))
blah=list(set(blah))
which gives my list of urls. So now I use a regex to search for the relevant urls which I want in a list:
for r... (0 Replies)
Discussion started by: metallica1973
0 Replies
5. Shell Programming and Scripting
I have few list value which are shown as below and want to print the same to a text file in python.
But I couldn't able to write to a file.
Could anyone please help me how to print the list with tuples to a file .
My code:
======
fout=open('output.txt','w')
mylist =
fout.write()... (1 Reply)
Discussion started by: scriptscript
1 Replies
6. Shell Programming and Scripting
Hi guys,
I'm trying to search for several strings, which I have in a .txt file line by line, on another file.
So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt.
So far, I've been able to do this, to search for individual strings:
... (1 Reply)
Discussion started by: starriol
1 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have several hundred subdirectories which contain input files for a binary executable. I need to get into each of the subdirectories, run the executable and then move to the next one and repeat the process. What is the best way to do this?
Arbitrarily my file structures look like... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies
8. UNIX for Dummies Questions & Answers
Hi !
It is a general question.
When an awk script looks like:
#! bin/awk
function example(i){
<body>
}
{
example(1) #the function uses input_1 and return output_a
}
{
example(2) #the function uses previous output_a as an input and returns... (15 Replies)
Discussion started by: beca123456
15 Replies
9. Shell Programming and Scripting
I have a file command.txt. It's content are as follows:-
The content of file is actually a command with script name and respective arguments.
arg1 and arg2 are dummy arguments , format : -arg arg_value
test is a argument specifying run mode , format : -arg
In my python code, i read it and... (1 Reply)
Discussion started by: animesharma
1 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I have a file with over 100,000 lines. I would like to be able extract 5000 lines at a time and give it as an input to another program.
sed -n '1,5000p' <myfile> > myOut
Similarly for
5001-10000
10001-15000
....
How can I do this in a loop?
Thanks,
Guss (5 Replies)
Discussion started by: Gussifinknottle
5 Replies