10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm using awk to print columns from a tab delimited text file:
awk '{print " "$2" "$3" $6"}' file
The problem I have is column 6 contains text with spaces etc which means awk only prints the first word.
How can I tell awk to print the whole column content as column 6?
Thanks, (10 Replies)
Discussion started by: keenboy100
10 Replies
2. Shell Programming and Scripting
Hi guru's,
I am trying to write a script to generate a csv file by connecting to database run a query and put the values into csv file.
But the problem i face is i am getting lot of space after one value.how can i remove those values?.
Please help.
#!/bin/bash
export... (2 Replies)
Discussion started by: karingulanagara
2 Replies
3. Shell Programming and Scripting
File contains 10 columns,i want trim the 2,4,10 columns using single unix command.
Please suggest me how to do?
Thanks (21 Replies)
Discussion started by: bmk
21 Replies
4. Shell Programming and Scripting
Hi All
I've a file which is similar to the one given below
column1 coulmn2 column3 column4
A B C D
X Y
F G H
I would like to get it in this format
A|B|C|D
||X|Y
F||G|H
Is... (4 Replies)
Discussion started by: Celvin VK
4 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement to remove certain spaces from a table of information, but I'm unsure where to start.
A typical table will be like this:
ABCDE 1 Elton John 25 12 15 9 3
ABCDE 2 Oasis 29 13 4 6 9
ABCDE 3 The Rolling Stones 55 19 3 8 6The goal is to remove only the spaces between... (11 Replies)
Discussion started by: danhodges99
11 Replies
6. Shell Programming and Scripting
Hey all, I have a list in the format ;
variable length with spaces
more variable information
some more variable information
and I would like to transform that 'column' into rows ;
variable length with spaces more variable information some more variable information
Any... (8 Replies)
Discussion started by: TAPE
8 Replies
7. Shell Programming and Scripting
Hi all,
I have created a script which adding two columns and removing two columns for all files.
Filename: Cust_information_1200_201010.txt
Source Data:
"1","Cust information","123","106001","street","1-203 high street"
"1","Cust information","124","105001","street","1-203 high street"
... (0 Replies)
Discussion started by: onesuri
0 Replies
8. Shell Programming and Scripting
Hi all,
I have a problem to format data from different database queries into one look. The input data are as follows, every line has the same number of values but a different number of characters:
adata, bdata, cdata, ddata
fffdata, gdata, hdata, idata
jdata, kdata, ... (6 Replies)
Discussion started by: old_mike
6 Replies
9. Shell Programming and Scripting
Hi All,
I have a comma seperated file.
I wanna remove the spaces from column 2. I mean i don't wanna remove the spaces those are presnt in column 1.
ex:
emp name, emp no, salary
abc k, abc 11, 1000 00
bhk s, bhk 22, 2000 00
the output should be:
emp name, emp no, salary
abc k, abc11,... (4 Replies)
Discussion started by: javeed7
4 Replies
10. Shell Programming and Scripting
Hello Friends,
Can any one help me with this issue:
I would like to format a file:
say if I have rows like:
4512 , SMITH , I-28984 ,, 4324 , 4343
42312 , SMITH , I-2EE8984 ,, 432E4E4 , 4343
I would like to have the output diaplayed like :
4512... (8 Replies)
Discussion started by: sbasetty
8 Replies