Shell Scripts

I have a text file . Format of text file.

djss:xd:78:isdev:"test server"

this type of row. (approx 30).

I want to display like that

  1. djjs@msxd testserver 2. xjfd@msxd devserver
  2.                                       4
    

select any one from above choice : 1

output :database name : djjs
Server name : isdev
version: 78

Are you expecting someone to write this script for you? Or, is there a question in there somewhere :confused:

i know if you use

cat -n filename I get out put like that

  1. abcddfdfd
  2. fdjfdl
  3. fdfdslf

but i want a code(script) for this. like
I have a text file. i want to display like

  1. abcdcd 2. fdfjdfljdf 3. fdfjdlsfjldsfjd
  2. fdjfldj 5. fdjfldjf
    and so on.
    it should be display in one page no -scroll.
    I wrote script but its not working properly.
    if you can help me
    thanks in advance.

if you need my code i will give you.

Maybe you should try posting your code. I don't understand what you want from your posts. :confused:

Looks like the OP wants help with homework.

Something like this should work:

FIELD_ONE=$(echo $VAR | cut -d: -f 1)

where $VAR is a variable that holds the info of which you speak. If you need more than that you'll want to dig into your "intro to shell scripting" resources.

HTH