Search Results

Search: Posts Made By: brianjb
1,835
Posted By brianjb
Only print specific xml values that meet two criteria in python
I have a large XML file that I want to parse, and only print one specific value if two values are met.

This is the code so far:

#!/usr/local/bin/python

import xml.etree.ElementTree as ET...
Forum: OS X (Apple) 08-27-2014
4,662
Posted By brianjb
Thanks. I learned a huge lesson from this. ...
Thanks.

I learned a huge lesson from this. And the ironic thing is that I was in the process to get all of my stuff backed up just in case. This was the last of those drives.

I'm trying to...
Forum: OS X (Apple) 08-27-2014
4,662
Posted By brianjb
Maybe it wasn't an error, and more of a message. ...
Maybe it wasn't an error, and more of a message. This is what I was seeing when I tried the tar:

tar: Truncated input file (needed 3256915968 bytes, only 3256910848 available)
tar: Error exit...
Forum: OS X (Apple) 08-27-2014
4,662
Posted By brianjb
I agree, that I was not thinking clearly at this...
I agree, that I was not thinking clearly at this time.

I do have some good news to report, though. I have the drive mounted, and I am in the process of copying the data off.

---------- Post...
Forum: OS X (Apple) 08-26-2014
4,662
Posted By brianjb
Need some help with lost data on external drive
Hi all,

I would really appreciate some assistance with some lost data on external drive. The external is a Seagate Goflex 3TB drive, Desktop hard drive | External Desktop hard drives | FreeAgent |...
3,307
Posted By brianjb
I would actually suggest using see for this...
I would actually suggest using see for this script. You can do inline editing. That means that you will replace files within the file and you won't have to create temp files and move them back to...
3,307
Posted By brianjb
I think sed will be a good choice for what you...
I think sed will be a good choice for what you want to do.

Are you wanting the script to ask for user input, and then change based on that?

I can help you with a script that does that.
1,897
Posted By brianjb
perl Compare zone files in directory with what is listed in named.conf
I would really appreciate any assistance that I can get here.

I am fairly new to perl. I am trying to rewrite my shell scripts to perl.

Currently I have a shell script (using sed, awk, grep,...
1,724
Posted By brianjb
Need help with perl script with a while loop reading file
Good morning, I appreciate any assistance that I can get from the monks out there. I am able to get this to work for me so that I can do a hostname lookup if I only specify one hostname in the...
1,307
Posted By brianjb
Configure BIND
I know how to manage DNS once it's installed. I can edit named.conf and create zone files. I can sign the zones, use TSIG, etc.

How do I take the BIND 9.9 tar ball from All Downloads | Internet...
1,389
Posted By brianjb
[SOLVED] Sorting file and get everything on same line on condition
Good afternoon!

I am a perl newbie. I hope you will be patient with me.

I have a script that needs to be written in perl. I can't do it in awk or shell scripting.

Here is the script:

...
2,008
Posted By brianjb
Replace commas with newlines
Good afternoon,

I am trying to read user input.

Here is what I have so far:


echo "Type the Container ID for every container that you want subnets exported"
echo "for (with comma between...
13,402
Posted By brianjb
To the OP. You can use sed like everyone has...
To the OP. You can use sed like everyone has said to remove the ^M at the end of each line.

But you can't just type in ^M. To get the ^M, press <CTRL> and "V" at the same time. Then let go and...
54,955
Posted By brianjb
crontab -e comment out each job that is...
crontab -e


comment out each job that is listed in cron
27,847
Posted By brianjb
Do you mean all cron jobs for all users? Or just...
Do you mean all cron jobs for all users? Or just the cronjobs for a particular user?

type in

crontab -e

as the user you want to disable crons. Then comment out each line.
2,337
Posted By brianjb
Add this to the end: awk...
Add this to the end:


awk '{print$1","$2","$3","$4","$5","$6","$7","$8","$9","$10","$11","$12","$13","$14","$15","$16","$17","$18$","$19","$20","$21","$22","$23","$24","$25","$26}'


Notice...
836
Posted By brianjb
sed -e 's/\"//g' filename > newfile or...
sed -e 's/\"//g' filename > newfile


or for inline editing:

sed -i -e 's/\"//g' filename
1,807
Posted By brianjb
Thanks bartus. let me run it like that and see.
Thanks bartus. let me run it like that and see.
6,262
Posted By brianjb
How about: ls -l *credit* | xargs grep -i...
How about:

ls -l *credit* | xargs grep -i "*data*" | grep -v "can't open"
7,101
Posted By brianjb
What about creating sshkeys and then using scp or...
What about creating sshkeys and then using scp or rsync?
33,734
Posted By brianjb
Can you post the entire file?
Can you post the entire file?
1,807
Posted By brianjb
Need help getting data into legible format...maybe awk?
Good morning,

I am still learning the powers of awk and perl. I am in need of a bit of help.

I have a script on one of my launch systems...if that is even the word for it. Basically you can...
1,971
Posted By brianjb
Put this at top of script: ...
Put this at top of script:


#!/usr/bin/perl
use warnings;


Then run it with -d, like this:


./test.pl -d
2,337
Posted By brianjb
mysql -u username -ppassword instancename -e...
mysql -u username -ppassword instancename -e "select id,name from table;" |awk '{print$1","$2}'


The above will export those two columns from that table and then put a comma between each one. ...
10,019
Posted By brianjb
Good point. They are real life examples of...
Good point. They are real life examples of exercises that you use the tools for. I have been lurking around for long time...it's time I get more involved. :D
Showing results 1 to 25 of 52

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