I have the following problem: Script
#!/usr/bin/ksh
for unitcaseno in `cat /pims/nigel/UNLOAD-DB/xaa`
do
echo "String = $unitcaseno"
unitno=`echo $unitcaseno | cut -d'|' -f1`
caseno=`echo $unitcaseno | cut -d'|' -f2`
echo "Unitno = $unitno:Caseno = $caseno"
break
done
The file is very large so I am breaking after the first record.
Sample file:
349702| 1|
349702| 1|
349702| 1|
1133247| 6|
1133247| 6|
12708 | 1|
12708 | 1|
299466 | 2|
299466 | 2|
299466 | 2|
299466 | 2|
501877 | 1|
501877 | 1|
55871 | 9|
55871 | 9|
64239 | 7|
64239 | 7|
Output
String = 349702|
Unitno = 349702:Caseno =
My problem is that it is not printing out the second field in either output.