Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question - how to display line number #103

Open
cjbd opened this issue Mar 7, 2021 · 2 comments
Open

question - how to display line number #103

cjbd opened this issue Mar 7, 2021 · 2 comments

Comments

@cjbd
Copy link

cjbd commented Mar 7, 2021

hello, i'm new to urlscan, this tool is pretty cool, i'm using it to find all urls in source code, the output is great, but it would be even better to print line number along with url found, how can i do that? thank you!

$ urlscan -n /path/to/mycode.cc
crbug.com
http://crbug.com/898555)
https://security.googleblog.com/2017/09/chromes-plan-to-distrust-symantec.html
http://crbug.com/921750)
@firecat53
Copy link
Owner

Nothing comes to mind immediately. I thought maybe some combination of --regex and --run, but I think urlscan would have to track the line numbers. This would take adding an option to list the urls by line number instead of just numerically. PR's welcome!

@elig0n
Copy link
Contributor

elig0n commented Oct 7, 2024

@cjbd You can use nl from coreutils.

$ urlscan -n /path/to/mycode.cc | nl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants