Range Start Option

29 views
Skip to first unread message

Bhavesh Verma

unread,
May 12, 2021, 3:11:03 PM5/12/21
to ack users
PS C:\xampp\htdocs\muslimzawaj> ack google -v --html --range-start='<head' --range-end='</head>'
The syntax of the command is incorrect.


In windows 10 range start and end option is not working. Please suggest

Bhavesh Verma

unread,
May 12, 2021, 3:11:03 PM5/12/21
to ack users
PS C:\xampp\htdocs\muslimzawaj> ack google -v --html --range-start='<head' --range-end='</head>'
The syntax of the command is incorrect.


The range start option does not work in windows.

Andy Lester

unread,
May 12, 2021, 3:15:11 PM5/12/21
to ack-...@googlegroups.com
I think it’s probably something related to quoting in the Windows shell/command line.  I’m not familiar with the Windows command line, so I’m going to try to help as best I can.

Let’s try to narrow it down to what is causing the problem.

Does it work without the —range-start and —range-end?

Like this: ack google -v --html

Does it work if you have the —range-start and not the —range-end?

Like this: ack google -v --html --range-start='<head'

What if you have the —range-end and not the —range-start?

ack google -v --html --range-end='</head>’

What if you take out the > and < from what you are searching for, like

 ack google -v --html --range-start='head' --range-end='/head’

Try different things until you can find out “Aha, this option works, and this one doesn’t”, and then we can go from there.

Andy

Bhavesh Verma

unread,
May 12, 2021, 3:32:24 PM5/12/21
to ack users
only 
ack google -v --html --range-start='head' --range-end='/head’

This command works for me


Bhavesh Verma

unread,
May 12, 2021, 3:32:51 PM5/12/21
to ack users
why tags are not working in range-start ?

Andy Lester

unread,
May 12, 2021, 3:38:24 PM5/12/21
to ack-...@googlegroups.com


On May 12, 2021, at 2:32 PM, Bhavesh Verma <bhavesh...@gmail.com> wrote:

only 
ack google -v --html --range-start='head' --range-end='/head’

So it seems like the Windows shell gets confused by the > and < characters. 

I googled around a bit and it seems like “double quotes” instead of ‘single quotes’ might stop the shell from being confused by > and <

I also found this page https://www.robvanderwoude.com/escapechars.php that talks about having to use ^< and ^> to escape those characters.  Maybe that will help.

In any case, it’s a Windows thing, not ack.

I hope this helps.  Good luck!

Andy

Bhavesh Verma

unread,
May 12, 2021, 3:48:42 PM5/12/21
to ack users
IT didn't worked for me
ack issues.png

Bhavesh Verma

unread,
May 12, 2021, 4:12:56 PM5/12/21
to ack users
Finally the below command work for me
ack goolge -v   --php --range-start='^^^<title^^^>' --range-end='^^^</title^^^>'

Thanks for your feedback.
ack issue resolved.png
Reply all
Reply to author
Forward
0 new messages