Search Results

Search: Posts Made By: tiggyboo
1,923
Posted By tiggyboo
Thanks... This one is an eye opener for me!
Thanks... This one is an eye opener for me!
1,923
Posted By tiggyboo
Conditional Search/Replace
I'm looking for an awk or (preferably) sed solution to search a pipe delimited file for any occurrence of an email address that does not include a designed domain, and replace the email address with...
4,278
Posted By tiggyboo
Thanks a bunch for the responses folks! Very...
Thanks a bunch for the responses folks! Very instructive to see the different options. I'm looking forward to the day when some of these regex type solutions become more intuitive to me :-).
...
4,278
Posted By tiggyboo
Delete line based on count of specific character
I'm looking for what I hope might be a one liner along these lines:
sed '/a line with more than 3 pipes in it/d'

I know how to get the pipe count in a string and store it in a variable, but I'm...
4,378
Posted By tiggyboo
Thanks very much folks!
Thanks very much folks!
4,378
Posted By tiggyboo
Comm compare, but column specific
I'm looking to compare two delimited files:


file1
one|xxx
two|xxx
three|xxx


file2
four|xxx
five|xxx
six|xxx
one|yyy

Where the result is the the file2 row whose first field...
1,374
Posted By tiggyboo
Thanks for the great responses guys - looking at...
Thanks for the great responses guys - looking at various solutions is a great learning tool. I was further off from a solution than I thought :-)
Al
1,374
Posted By tiggyboo
Sed pattern space/looping conundrum
Although my sed skills are gradually developing, thanks in large part to this forum, I'm having a hard time dealing with pattern space and looping, which I suspect is what I'll need a better handle...
Forum: Web Development 05-02-2011
1,231
Posted By tiggyboo
mysql 4.0 -> 5.0 upgrade woes(?)
We recently upgraded mysql from 4.0 to 5.0 and the following code is throwing (via DB.php) a "Database Error: Unknown" error. I can say with certainty that my connection parameters are correct and...
2,073
Posted By tiggyboo
Just what the doctor ordered, thanks a bunch! Al
Just what the doctor ordered, thanks a bunch!
Al
2,073
Posted By tiggyboo
Escaping special characters
I'm attempting a little hack to get grep to highlight (change foreground color to red) a found string. Assuming a target file "test" consisting of the word "albert":

My executable "algrep"...
4,884
Posted By tiggyboo
Variable expansion in sed
The objective of the code below is to create sed script to be later executed. However, it bonks because $ARCHIVENAME expands to a directory specification so the forward slashes cause problems. I can...
5,782
Posted By tiggyboo
Thanks very much, the awk gig did the trick!
Thanks very much, the awk gig did the trick!
5,782
Posted By tiggyboo
Sed position specific replace
I'm drawing a blank on how to use sed to replace selectively based on position in the string (vs nth occurence):

hello.|there.|how.|are.|you.|

I want the period removed in the 3rd item (as...
7,642
Posted By tiggyboo
Sed conditional replace
Given this row:

|lastname1|middlename1|firstname1|lastname2|middlename2|firstname2

produce this result:

|lastname|middlename|firstname

where the resultant names are based on the...
10,553
Posted By tiggyboo
Thanks folks, what I eventually ended up with...
Thanks folks, what I eventually ended up with was:

awk -F'|' 'NR==FNR{++a[$1];next} $1 in a' file1 file2> first.dat
awk -F'|' 'NR==FNR{++a[$1];next} $1 in a' file2 file1> second.dat

comm -13...
10,553
Posted By tiggyboo
comm -12 based on 1 column
I'd like to eliminate the rows in two files that do not share a common value in the first column. Here's my tortured logic that is way too inefficient to consider, but might show what i'm trying to...
3,218
Posted By tiggyboo
Thanks, just what I was looking for! Al
Thanks, just what I was looking for!
Al
3,218
Posted By tiggyboo
awk column compare
I've been banging my head against the wall to accomplish the following. Given two files:

File a.txt

12345 hello
32324 there

File b.txt

12345 stuff
45454 howdy
32324 joe

If...
Showing results 1 to 19 of 19

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