- The problem statement, all variables and given/known data:
I dont know what I do wrong, I am trying to create shell programming database:
I have this command first:
[ ! -f $fname ] && > $fname
...
echo $Name:$Surname:$Agency:$Tel:$Ref: >> $fname
then I have
echo " Name Surname Agency Tel email Ref"
echo ================================================
...
-
Relevant commands, code, scripts, algorithms:
sort -t : +1 $fname | awk -F '{printf ( "%-8.8s%-9.9s%-9.9s%-11.11s%-8.8s%-9.9s%" $1,$2)}' -
The attempts at a solution (include all code and scripts):
I have tried with and without the FS "-F" the error was." sort warning : "+number" syntax is deprecated please use "-k number" only with -F the error is above the table and without -F it is below the table. -
School (University) and Course Number:
---------- Post updated at 08:22 AM ---------- Previous update was at 07:27 AM ----------
Hi All,
Thanks, I have found the solution:
I have just replaced the +1 with -k 1 and it worked perfectly no error but it will not show the contents of the database..
Anyone can help ?
Cheers