Are you filtering a large CSV file, typically > 2 GB? Let's say you have a CSV file larger than 2 GB and you want to filter only the matching rows. First option that comes to our mind is shell script. It's simple and fast. Alright, lets do it. Scope I have CSV file, input.csv with 10.1 million rows The file size is 2.1 GB I need to search for any of the 200 words I have in terms.txt file I want the matching rows in output.csv, containing any of the 200 search texts #!/bin/bash > output.csv # clear or create output file # Read each search string from search.txt while IFS= read -r search; do # Loop through all CSV files inside the folders find . -type f -name "*.csv" | while IFS= read -r csv; do # Search for the string in the CSV file and append matching rows grep -iF -- "$search" "$csv" >> output.csv done done < terms.txt 👏Cool. It completed in 5:49 mins. Problem solved! Wait.🤔 Im supposed to get only 1...
I have used Keycloak in its very early stage ( when it is was in 2.x version). But now it has come a long way (at this time of writing it is in 21.x) In this article let's configure Keycloak behind Nginx. Here are the points to consider. If you want to configure Apache2 as a proxy server for your java application, please check this article . We are going to use a domain name other than localhost Anything other than localhost will require Keycloak to run in production mode which requires SSL configurations etc. Or it requires a proxy server. Lets begin. Requirements Keycloak distribution Ubuntu 22.04 server Configuring Keycloak 1. Download Keycloak from here . 2. Extract it using tar -xvzf keycloak-21.0.1.tar.gz 3. Create a script file called keycloak.sh with the following contents #!/bin/bash export KEYCLOAK_ADMIN=<admin-username-here> export KEYCLOAK_ADMIN_PASSWORD=<admin-password-here> nohup keycloak-21.0.0/bin/kc.sh start-dev --proxy edge --hos...