cin2000
1
Hi,
I am very confused with my printf command.
Somehow one variable can't line up with others...
newstart2 ="Mon Nov 11 01 00:00:00 2002"
printf "%-20s" $newstart2
Here is the output:
Mon Nov 11
01 00:00:00 2002
It spread out to two lines..
Why?
#!/bin/ksh
newstart2="Mon Nov 11 01 00:00:00 2002"
printf "%-30s\n" "$newstart2"
$newstart2 without the quotes becomes a list of separate arguments for printf because a space is what printf wants to see between arguments.