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 flag -v for inverse match,
grep -v "?" file
Or using awk with !
awk '!/?/' file
Using GNU sed
sed -n '/?/!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.