Draw a Horizontal and Vertical line on UNIX

I want to draw a horizontal and vertical line on Unix. Please suggest some solution.

Please give more details...

There are many ways to do this, one could open Open Office Draw or Gimp and draw a horizontal/vertical line. One could create a c++ application that draws a line (vertical/horizontal) on the screen, or many other various ways one could "draw a line" in Unix.

There is just no way to get what you are trying to do from the lines you wrote.

I want a graph look like

 12:00       3:00

Line |_________|

suggestion some solution

Where is the data for the graph coming from?

Are you just manually creating a graph in a graphic application?

Are you asking for a log analysis tool that will create a graph?

There is really no information here to know what you want. I am sorry really, but without more information I doubt anyone can help you as we do not fully understand what you need.

Yeah, I think you should need to be more specific and detailed with your question. But if all you need to do is print a simple horizontal/vertical line then you can try the ff.:

yes "|" | head -100 # Vertical line

or

yes "_" | head -100 # Horizontal line

or

while (( i <= 100 )); do
printf "_"
(( i = i + 1 ))
done

or

while (( i <= 100 )); do
printf "|"
(( i = i + 1 ))
done

Thanks angheloko, tell me one more thing

    12:00

Line |__________|

How to write 12:00 on 1st spot and 3:00 on 2nd

:confused:

I'm not sure what you're getting at or what your desired output really is but if you just need to display:

12:00 3:00
Line |_________|

Then just:

echo "12:00 3:00"
echo "Line |__________|"

Like I said earlier, you need to post more details man.

I want to graphical display on Unix and It can be in the viewable form of a Excel chart, web page, jpg image or perhaps something else.

The input would contain a start time and duration for each line segment and they may not be contiguous. The input from XML file data. The output look like as attached file.
Please provide some suggestion.

How to write vertical text ??
How to convert a text data file to image file??
Please suggest some solution

Vertical text is not possible on the console (except maybe with Unicode characters). To create an image based on data, I suggest looking at a graph library or a generic image manipulation library (such as GD)

Thanks Pludi for prompt reply
One more thing, is GD available on UNIX?
GD provide horizontal and Vertical graph on Unix?
please suggest or give some link for download GD.

GD is Open Source, so there's a good chance a binary is available for your choice of UNIX. If not, feel free to compile.
It's primary use is that of an generic image manipulation library, which means that it doesn't support graph generation out of the box, but instead hands to the possibility to create your own, customized routines for those.
As for use in scripting, Perl (and many others) do have support for the GD lib, including pre-made graph generation