Tagged Questions
1
vote
2answers
132 views
How can I find matches with sed (or similar) for configuration parameters?
I'm pretty good at using php's preg_match (and similar) commands, and I'm also pretty good with regular expressions, but I don't do very well with sed.
I have two shell scripts I'm working on and I'd ...
2
votes
2answers
305 views
Parse apache logs to exclude IP ranges
I need to look for some requests in a huge pile of apache logs. My only requirement is this:
I need to only view the requests coming from any IP address that is NOT included in a list of 50 IP ranges ...
9
votes
6answers
597 views
Text Manipulation Across multiple lines
I Have a file that has text like this:
AAAA
BBBB
CCCC
DDDD
1234
5678
9012
3456
EEEE
7890
etc...
And i want to match up the Alphabetic lines with the Numeric lines so they are like this:
...
2
votes
2answers
631 views
Sed: replacing digits
I am trying to write some install scripts for when I install/upgrade Ubuntu. I'm having trouble with fixing logrotate.d:
/var/log/ufw.log
{
rotate 7
weekly
missingok
notifempty
compress
delaycompress
...
3
votes
4answers
3k views
Match regex in ksh
I am looking to do something like this in KSH:
if (( $var = (foo|bar)[0-9]*$ )); then
print "variable matched regex"
fi
Is it possible at all?
For the record I'm using Ksh Version M-11/16/88i ...