I have a large file with over 800k entries (access log file). I need to output a file with only clean URLs (without parameters / "?") in the URL.
Output should only display entries that DON'T have a "?" in the URL.
Parameter url:
I have a large file with over 800k entries (access log file). I need to output a file with only clean URLs (without parameters / "?") in the URL.
Output should only display entries that DON'T have a "?" in the URL.
Parameter url:
In POSIX grep with the --invert-match (short: -v) for inverse match,
grep --invert-match "?" file
Or using awk with !
awk '!/?/' file
Using GNU sed with --quiet or --silent (short: -n):
sed --quiet '/?/!p' file
@Seasonal_showers: You haven't shown us a handful samples, so considering that your Input_file will have only URLs and nothing else, could you please try following then.
grep -v '?' Input_file
Let me know if this is not helping, you could show more sample Input_file details for better understanding then.