05-02-2013
Arrange data in table
Hello vidyadhar85,
The data is not taken from database. it is given by user and appended to a record.txt file.
My original script is designed to do follwing o/p
Enter your first name,city,phone number and email saperated by space
Jhon Newyork 123456789
Jhon123@gmail.com
This data given by user is appended to record.txt
In this case we can not predict the length of the data..
---------- Post updated at 04:07 PM ---------- Previous update was at 03:59 PM ----------
The output should be same as the attached file.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Any idea in awk or sed?
$cat file
a b c
2 4 5 6
output:
a
b
c
2
4
5
6 (3 Replies)
Discussion started by: kenshinhimura
3 Replies
2. Shell Programming and Scripting
Which is the best command(s) to arrange data of a file?
This is my example input file:
Tom ------
apples: 5
oranges: 7
pears: 10
apples: 2
oranges: 8
Jack ------
apples: 3
pears: 10
Lucy ------
oranges: 1
pears: 8
peaches: 9
Tom ------
peaches: 1
Jack ------ (1 Reply)
Discussion started by: csecnarf
1 Replies
3. UNIX for Dummies Questions & Answers
I have a following data:
100 200
300 400
I want the data to be arranged:
100 200 300 400
What is the best way to do this?
Thanks! (5 Replies)
Discussion started by: bobo
5 Replies
4. Shell Programming and Scripting
Everybody,
can you tell me how express about this; we have text data file as :
parameter1 Parameter2
AA 55
BB 77
. .
. .
. .
We want to draw table for this data as attached then send as body of Email (4 Replies)
Discussion started by: xjklop2009
4 Replies
5. Shell Programming and Scripting
hi,
i used paste file1.txt file2.txt > file3.txt to merge 2 columns from file1 and 4 columns from file2.
file1
scaffold_217 scaffold_217
file2
CHRSM N scaffold_217.pf scaffold_217.fsa
the result is as follows:-
scaffold_217 scaffold_217
CHRSM ... (6 Replies)
Discussion started by: redse171
6 Replies
6. Shell Programming and Scripting
Input
217:fngadi4osa:fngadi4osa:M 217:415744:N/A
227:fngadi4osa:fngadi4osa: M 227:51200:N/A
228:fngadi4osa:fngadi4osa: M 228:102400:N/A
65:sapgt04:sapgt04: M 65:104448:N/A
228:fngadi4osa:fngadi4oma: M 228:102400:N/A
Output
217:fngadi4osa:fngadi4osa:M 217:415744:N/A... (3 Replies)
Discussion started by: greycells
3 Replies
7. Shell Programming and Scripting
I have vary complex issue in unix...i want copy same data in same column...
My Input...
Object SpchAccate hAes hCCS SDop Sroontb NoRabEt SRbuc
ran=C515D (Mod=15) 0 100 98.1 1.9 0.6 ... (7 Replies)
Discussion started by: asavaliya
7 Replies
8. Shell Programming and Scripting
Hi Team,
I have one file in that almost 100+ words in lines
Eg:-
Unix
windows
solaris
Linux
...
...
But I want arrange all lines in table format and can able read on screen
Eg: -
Unix windows solaris Lunix......
Hp unix Mac-os ......
Like as Table...... (11 Replies)
Discussion started by: Bhaskar Alagala
11 Replies
9. Programming
Hello everyone,
I have some problem about this code :
#!/usr/bin/env python
import sys
try :
filename = sys.argv
except :
print 'Specify filename'
sys.exit()
fd = open(filename)
lines = fd.xreadlines()
compare = {}
for line in lines :
split_line =... (1 Reply)
Discussion started by: awil
1 Replies
10. Shell Programming and Scripting
Hello All,
I have following data into my file named record.
Name City phone number email
Jhon Newyork 123456987 jhon@gmail.com
Maria Texas 569865612 Maria_Sweet@rediffmail.com
Chan Durben NA Chan123@gmail.com
The output should be in straight columns.. There should not be any... (1 Reply)
Discussion started by: Nakul_sh
1 Replies