Simple bash script for showing Farming Simulator mods

Throwing this on here for my reference. Given a Farming Simulator 17 save game location it will print out a nice list of the mods in use.


#!/bin/bash

if [ -z "$1" ]; then
    echo "Usage: $(basename $0) "
    exit 1
fi

DIR="$1"

cat "${DIR}/careerSavegame.xml" | \
grep -oP '(?< =modName=").+(?=" version)' | \
sed 's/" title="/ | /' | sort

Leave a Reply