On Thu, Jul 14, 2016 at 04:02:02PM +1000, c...@zip.com.au wrote:
> On 13Jul2016 22:03, Mike Wright wrote:
> > OK, thanks everybody.
> >
> > Had to use egrep. This works:
> >
> > PATTERN='https?://[^/]*\.in(/.*)*'
> > egrep $PATTERN file.of.links > links.in
>
> You need quotes around $PATTERN wh
On 07/13/2016 11:02 PM, c...@zip.com.au wrote:
On 13Jul2016 22:03, Mike Wright wrote:
OK, thanks everybody.
Had to use egrep. This works:
PATTERN='https?://[^/]*\.in(/.*)*'
egrep $PATTERN file.of.links > links.in
You need quotes around $PATTERN when you use it, thus:
egrep "$PATT
On 13Jul2016 22:03, Mike Wright wrote:
OK, thanks everybody.
Had to use egrep. This works:
PATTERN='https?://[^/]*\.in(/.*)*'
egrep $PATTERN file.of.links > links.in
You need quotes around $PATTERN when you use it, thus:
egrep "$PATTERN" file.of.links > links.in
You may be getting away wi
On 07/13/2016 08:46 PM, Chris Adams wrote:
Once upon a time, Jon LaBadie said:
On Thu, Jul 14, 2016 at 02:09:27AM +, Christopher wrote:
On Wed, Jul 13, 2016, 21:11 Chris Adams wrote:
Once upon a time, Mike Wright said:
Putting all that together, I'd recommend:
PATTERN='https?://[^
Once upon a time, Jon LaBadie said:
> On Thu, Jul 14, 2016 at 02:09:27AM +, Christopher wrote:
> > On Wed, Jul 13, 2016, 21:11 Chris Adams wrote:
> >
> > > Once upon a time, Mike Wright said:
> > >
> > > Putting all that together, I'd recommend:
> > >
> > > PATTERN='https?://[^/]*\.in/'
>
On Thu, Jul 14, 2016 at 02:09:27AM +, Christopher wrote:
> On Wed, Jul 13, 2016, 21:11 Chris Adams wrote:
>
> > Once upon a time, Mike Wright said:
> >
> > Putting all that together, I'd recommend:
> >
> > PATTERN='https?://[^/]*\.in/'
> > grep "$PATTERN" file.of.links > links.in
Minor
On Wed, Jul 13, 2016, 21:11 Chris Adams wrote:
> Once upon a time, Mike Wright said:
>
> Putting all that together, I'd recommend:
>
> PATTERN='https?://[^/]*\.in/'
> grep "$PATTERN" file.of.links > links.in
>
> or just:
>
> grep 'https?://[^/]*\.in/' file.of.links > links.in
>
> Only pote
Once upon a time, Mike Wright said:
> PATTERN="^.*http:\/\/.*\.in.*$"
> grep $PATTERN < file.of.links >links.in
Several issues I see:
- it appears you are using a shell variable to pass the pattern; since
you are using double quotes, shell interpolation occurs, so all the
escaping \ characte
Hi all,
There is a file with a collection of links from global sites. While
trying to sort the links into categories I'm catching the wrong things.
e.g. find links from India:
PATTERN="^.*http:\/\/.*\.in.*$"
grep $PATTERN < file.of.links >links.in
Even though the "." in front of "in" is esc