Displaying 20 results from an estimated 10000 matches similar to: "awk global replacement only after keyword"
2009 Jun 24
4
More awk help
Hey guys,
Looking through my book and the web and I am not having any success
returning data from a search.
I need to have awk search for a string and print the first field which
is no problem but now its returning two options as the input data has
changed. The change is reliable, I only want the first field if it ends
in a regex that I have, and I only want what that regex matches to be
printed.
2009 Jul 07
1
Formatting print with awk and ORS
I have a command I execute:
awk 'BEGIN { ORS=" " } { print "\"" $1 "\"" }' input_file
which gives me exactly what I need, all field one's in quotes on one line
each separated by one space. I now need to print a single quote around all
of this, but the ORS flag is screwing me up, it's causing every attempt I
try to repeat for every record.
2011 Mar 16
3
perl one-liner issue
I am trying to deduce the one liner for an rpm I am packaging to edit a php
configuration file from within my spec. The line I am editing looks like:
$conf['nagios_base'] = "/nagios/cgi-bin";
What are the escape requirements Perl needs from within the shell to
search for this?
As I have seen, the syntax is a mess, any pointers would be appreciated!
thanks,
jlc
2008 Apr 07
7
MS Exchange Replacement
What is the closest open source mail server I can replace exchange with that provides the nearest equivalent in user experience?
Thanks!
jlc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20080406/5a469804/attachment-0001.html>
2011 Jun 06
2
regex question
Hey guys,
I am trying to extract a pattern from a downloaded html file. I only want the first match
printed, problem is I don't know how to force sed to exit after printing the first match of
a capture group. Anyone know the trick to manipulating {p;q;} to print a capture group?
Thanks,
jlc
2009 Jan 05
3
Log File Reviewing
I need to review a logfile with Sed and cut out all the lines that start with a certain word, problem
is this word begins after some amount of whitespace and unless I search for whitespace at the
beginning followed by "word" I may encounter "word" somewhere legitimately hence why
I don't just search for "word" only...
Anyone know how to make sed accomplish this?
2008 Jun 23
2
Awk help
I have csvde dump from active directory I process on my postfix mta.
It takes output like this:
"CN=Curtis xxx,OU=Domain Users,OU=xxx xxx,DC=xxx-xxx,DC=local",X400:c=US\;a= \;p=xxx xxx xxx\;o=Exchange\;s=xxx\;g=xxx\;;SMTP:Cxxx at xxx-xxx.com
and should return a relay_recipient map in the form of:
Cxxx at xxx-xxx.com OK
The command I am using is:
cat $1 | tr -d \" | tr , \\n|
2010 Jul 12
6
Project Management Solutions
I need to implement a solution and not having ever used anything but
MS Project I would be grateful for a reco on something good. The only
hope would be that its web based but I am open to anything!
Thanks!
jlc
2008 Oct 25
9
Cheapest 4 port FXO
I need to increase reliability at an office as SIP/Internet provider outages are causing some issues.
What would be the least expensive analogue card that people are using reliably?
Thanks!
jlc
2010 Jan 20
4
error rsyncing large file
Trying to rsync a rather large file from a windows server to a centos server
and all but this is working fine.
As it's a 20 gig file I am trying to send the diff of with a -c, I suspect over
the low bandwidth this presents an issue. I also stage this file locally on another
centos server and could calc the diff and create a patch and send that, comparing
checksums etc...
A quick look at
2007 Dec 18
5
Logging into Windows 2003 Active Directory
I have been searching the net for directions on rhel and centos 5(1) to log in to a windows domain and have found many examples, all different and none work for me.
Is there a hint to some documentation anyone here knows of that actually works?
Thanks!
jlc
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2010 Feb 27
5
Python Script Issue
Hey Guys,
I am trying to get a python script running but I get the following error:
atexit.register(atexit_handler)
NameError: global name 'atexit' is not defined
A Google search doesn't really help me, except confirm that I don't know
anything about python:)
Anyone got any ideas?
Thanks,
jlc
2008 Apr 22
3
Console Screen Saver
How does one access the properties associated with the blanking CentOS does at init3?
How would I disable this for example?
Thanks!
jlc
2008 Jul 10
4
Shell Script Question
What's the simplest way to increment the number 0000 up by one until some other 4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
Thanks!
jlc
2008 Jul 19
4
Personal Wiki for CentOS
For ages I have been keeping docs and notes in Public Folders inside an Exchange server
and want to move this out to a more modern facility that allows tagging and searching via
a web interface for keywords so I can keep all my notes more organized.
Anyone have any personal recos for the slickest system to do this with. Given the nature of
my home setup, its routinely used to lab stuff up so I
2010 Jan 08
3
Best way to hold at 5.3 release
I need to do some testing with 5.3 as its suggested that 5.4 has
"some bugs in the toolchain and libc". That being the case, I can
install with a url and repo line pointing to a mirror with 5.3 still
but how does one properly make sure during subsequent uses of yum it
doesn't attempt to use 5.4 rpms?
Is it simple enough to just manually set '$releasever' to 5.3 in the
repo
2008 Jul 22
3
harddisc or nfs based install
When choosing either of these methods and using an iso, how does CentOS determine
the right iso file to mount? Is there an expected file name format?
Thanks!
jlc
2009 Feb 27
16
(a) WinPower RPM available? (b) where to install if use tar.gz file?
Two quick and simple questions; I want to install the "WinPower"
software for my new UPS. On their web site, they have a tar.gz file
available for download. I know the reasons for staying with RPM, if at
all possible. I''ve Googled and Yahood for ""WinPower"+RPM+Linux and
get hits, but no obvious RPM. I tried "yum install winpower" and the
response was
2010 Jan 02
6
mutt execution by daemon
I have a user w/o a shell that runs an app as a daemon that needs to use
mutt to email an attachment from a script.
During testing when the app was ran as root everything worked:) Now that
we obviously are running as a user w/o a shell this little bit broke. I
used mutt as I needed to send the attachment as mime, and the ability
to specify a muttrc from the cli when executed was useful so we
2008 Apr 29
3
SSH Key length
What are the ramifications to a large key length when using pub/priv keys
for ssh authentication. I have some remote admin and file transfers to manage
and only have ssh access w/o vpn to use for it.
Thanks,
jlc