Search Results

Search: Posts Made By: TheBigAmbulance
5,775
Posted By TheBigAmbulance
Thanks for the replies. the problem I end up...
Thanks for the replies.

the problem I end up with is that if I use a *.rrd, the source directory becomes part of the $FILE.

/backup/cacti_xml.sh: line 9:...
5,775
Posted By TheBigAmbulance
Script that will be a cron job to export rrd files for cacti server
I wrote a quick little script that will eventually end up as a cron job to export rrd files for my cacti server.

Here is the script:
#!/bin/bash

rm -rf /backup/cacti_xml/*
cd...
4,120
Posted By TheBigAmbulance
Thanks DeepakS! That got me closer. I modified...
Thanks DeepakS! That got me closer. I modified the script you sent with my test files.
open(INPUT, "<thing.txt") || die ("Couldn't open input data");
open(OUTPUT, ">thing2.txt") || die ("Couldn't...
4,120
Posted By TheBigAmbulance
My Apologizes.... I have revised the thread... ...
My Apologizes.... I have revised the thread... :rolleyes:

What I have tried in various forms is this:
s/(^#)(^host)(^filename)(^fixed)(^hardware)(^})/$1$2$3$5$4$6/

But my regex skills are...
4,120
Posted By TheBigAmbulance
swapping lines that match a condition using sed, perl or the like
I'm a bit new to regex and sed/perl stuff, so I would like to ask for some advice. I have tried several variations of scripts I've found on the net, but can't seem to get them to work out just...
2,901
Posted By TheBigAmbulance
THANK YOU VERY MUCH!! That did exactly what it...
THANK YOU VERY MUCH!! That did exactly what it needed to.
1,537
Posted By TheBigAmbulance
kubuntu@kubuntu-M6400:/$ sed '/host/ s/$/QQQ/g'...
kubuntu@kubuntu-M6400:/$ sed '/host/ s/$/QQQ/g' junk
QQQost Example_1
filename-"gfnwd.cfg";
hardware-ethernet-00:13:11:fd:7a:88;
fixed-address-10.10.6.19;
}
QQQost Example_2...
1,537
Posted By TheBigAmbulance
trying to understand what sed is doing?
Can someone help me understand why

sed '/host/ s/$/QQQ/g' junk

is taking the file 'junk' which is this:

host Example_1
filename-"gfnwd.cfg";
hardware-ethernet-00:13:11:fd:7a:88;...
2,901
Posted By TheBigAmbulance
Manipulate lines with sed/awk
Hey All,

I need to reorganize a file's text. Here is the source:

host John_Doe
filename "config.cfg";
hardware ethernet 98:10:3d:13:8f:98;
fixed-address 10.10.10.29;
}
host Jane_Doe...
Showing results 1 to 9 of 9

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