similar to: More awk help

Displaying 20 results from an estimated 20000 matches similar to: "More awk help"

2010 Mar 26
3
awk global replacement only after keyword
Trying to avoid a perl script which wouldn't be hard, but I am looking for an awk one liner that does a replacement, but only after it sees a key word on some line. Anyone know of that's easy to do? Thanks! jlc
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.
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?
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
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 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|
2009 Jul 06
5
Dial cmd help
I have a dial cmd buried amongst a series of others in a macro like so: exten => s,n,Dial(SIP/1${ARG1}@sip_peer,60,T) Reason for adding a "1" is all the others in the macro don't want the "1" so this was easiest at the time. Now I need to send NA long distance through this macro. All the other dial cmds will just work, but this one is going to try to dial 11NXXNXXXXXX
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 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 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>
2008 Jul 09
1
Need help with awk one-liner
This awk command pulls URLs from an apache config file, where $x is the config filename. awk '/:8008\/root/ {printf $3 "\t"}' $x The URL that is output by the script looks something like this: ajpv12://hostname.network.company.com:8008/root Is there a way to alter the output so it only shows "hostname" by itself? Do I need to pipe this through awk again to clean it
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
2009 May 12
2
regex help
I need a little help, trying to search for a line that begins with /dev and ends with a single digit that I will choose, like 5. I can search for ^/dev and 5$ but I am having trouble forming the combined search pattern using egrep. Any ideas? Thanks! jlc
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:
2009 Jun 10
3
grep/sed help
I am rsyncing and remotely doing some work based on a logfile from a windows box from a centos backup server. I get the output from a vss snapshot that has a section like this: * SNAPSHOT ID = {639ef5df-c933-4496-878a-ed57b9d52876} ... - Shadow copy Set: {427ac5db-21be-4c53-8ca4-24e7bac86a1d} - Original count of shadow copies = 2 - Original Volume name:
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
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 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