<commit_before>#!/bin/sh

# extract-whitehall-mappings.sh

# Filters the given input to only include lines which start with
# the host we are interested in.

set -e

usage() {
    echo "usage: $0 [opts] host" >&2
    echo "    [-?|--help]                 print usage" >&2
    exit 1
}

while test $# -gt 0 ; do
    case "$1" in
    -\?|-h|--help) usage ;;
    --) break ;;
    -*) usage ;;
    esac
    break
done

host=$1 ; [ -z "$host" ] && usage

# 1       2       3      4         5    6         7
# Old Url,New Url,Status,Whole Tag,Slug,Admin Url,State
echo "old url,new url,status,source,row_number"
grep -E "^\"*https*://$host[/,]" |
  sed 's/""//g' |
  cut -d , -f 1,2,3
<commit_msg>Removing incorrect and redundant comment<commit_after>#!/bin/sh

# extract-whitehall-mappings.sh

# Filters the given input to only include lines which start with
# the host we are interested in.

set -e

usage() {
    echo "usage: $0 [opts] host" >&2
    echo "    [-?|--help]                 print usage" >&2
    exit 1
}

while test $# -gt 0 ; do
    case "$1" in
    -\?|-h|--help) usage ;;
    --) break ;;
    -*) usage ;;
    esac
    break
done

host=$1 ; [ -z "$host" ] && usage

echo "old url,new url,status,source,row_number"
grep -E "^\"*https*://$host[/,]" |
  sed 's/""//g' |
  cut -d , -f 1,2,3

{'fraction_non_alphanumeric': 0.17986164488854728, 'fraction_numerical': 0.0207532667179093, 'mean_word_length': 2.0926365795724466, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1991715', 'n_tokens_mistral': 518, 'n_tokens_neox': 495, 'n_words': 150}