SHIFT-WIKI - Sjoerd Hooft's InFormation Technology
This WIKI is my personal documentation blog. Please enjoy it and feel free to reach out through blue sky if you have a question, remark, improvement or observation. See below for the latest additions, or use the search or tags to browse for content.
HTML: Redirect
Summary: Create a redirect with HTML
Date: Around 2010
Refactor: 4 January 2025: Checked links and formatting.
Bash: Use Full Lines From Inputfile as Matching Pattern
Summary: How to use an inputfile from which the full line is used as a search pattern in other files. The other files all start with SHIFT. The inputfile lines contain whilespaces.
Date: Around 2014
Refactor: 6 April 2025: Checked links and formatting.
inputfile=/tmp/inputfile.txt
nlines=`cat $inputfile | wc -l`
teller=1
while [[ $teller -lt $nlines ]]; do
match=`head -$teller $inputfile | tail -1`
grep "$match" SHIFT* > /dev/null
if [ $? -eq 0 ]; then
echo $match still exists!
fi
teller=$(($teller+1))
done
Explained code:
inputfile=/tmp/inputfile.txt
# Count the number of lines in the inputfile. This is the number of times the loop will be gone through.
nlines=`cat $inputfile | wc -l`
teller=1
while [[ $teller -lt $nlines ]]; do
# Use head and tail to set a variable with a complete line from the inputfile
match=`head -$teller $inputfile | tail -1`
grep "$match" SHIFT* > /dev/null
if [ $? -eq 0 ]; then
echo $match still exists!
fi
teller=$(($teller+1))
done
This wiki has been made possible by:
AIX NIM Client
Summary: ALthough AIX is by now on version 7.3 I find these old pages so fascinating I decided to keep them. On this page I'll show you how to a work with a standalone client to the NIM environment. This page is for AIX 5.3 and AIX 6.1.
Date: Between 2010-2013
Refactor: 21 December 2024: Checked formatting.
