I need to make a ksh script with colors, it is possible with printf to combine column and colors ? i seem not working, I think i dont doing the good thing:
the position is ok
Name______Age________Site
----________---_________----
Bob Actor___30_________Orange County
Toto_______20_________France
The color is ok Colorisok
The position is ok but it dont translate the octal color code
Name______Age________Site
----________---_________----
\033[34mBob Actor\033[m \033[31m30\033[m \033[30mOrange County\033[m
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? (1 Reply)
Hi All,
is it poosible to Print the error messages in colors.., i am using KSH...,
i have tried the following,
echo "\033 Hi This is Sam!!!
But, when i tried to redirect in to a log file, i am getting as follows,
echo "\033 1 line, 31 characters
^[[34m Hi This is Sikki!!! ^[[0m
... (0 Replies)
Hello,
Could someone please help me to convert a string(s) of comma separated values into space padded columns in .ksh?
ex.
10-21-2008,someword,blah,127.0.0.1,8,3
10-21-2008,randomword,ick,128.0.111.128,1,0
converted to
10-21-2008 someword blah 127.0.0.1 8... (6 Replies)
1-) For the command below, I want to read second column: 32751. How will I get it ?
$ ps -ef|grep deneme
U00 32751 22745 0 16:30 pts/1 00:00:00 ksh deneme
U00 32762 32132 0 16:30 pts/2 00:00:00 grep deneme
2-) For the command below, how will I read all lines line by line? For... (1 Reply)
#!/usr/bin/ksh
var1="Hi World"
var2="Morning"
var3=$(echo "$var1" \n "$var2")
echo $var3
var3=$(printf "$var1 \n $var2")
echo $var3
Output
Any way to get
in my $var3 ? (7 Replies)
Hi ALL,
I am using SunOS 5.9 and KSH(bin/ksh)
The problem am facing is
error message diaplyed on screen
printf: 12099415.79 not completely converted
printf: + expected numeric value
printf: 11898578.29 not completely converted
When i try printing with
The output is... (6 Replies)
Hi All,
I am attempting to create a fixed length tilde delimited file using printf.
The variables are initialized to fixed length blank spaces
a=' '
b=' '
c=' '
d=' '
Sometimes the variable might contain values and sometimes they are... (5 Replies)
Hi all,
i have written this script:
awk -F';' '
BEGIN {
printf "\n"
printf "\n"
printf "\n"
printf "----------------------------------------------\n"
print " For test "
printf "----------------------------------------------\n"
test_200 = 0
test_300 = 0
test_500 = 0
test_1000 = 0... (11 Replies)
Hi,
I am trying to put stty columns 140 in .profile to set column width to 140 so I don't have to manully do it every time.
My main goal is to avoid seeing "Terminal too wide" message whenever I try to use vi editor in full screen.
I am on korn shell
echo $SHELL
/bin/ksh
So even... (8 Replies)