10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
The output file contains data as below.
"20141023","CUSTOMER" ,"COMPANY" ,"IN0515461" ,"" ,"JOSHUA"
There are spaces in between the ending " and ,. The number of spaces is random.
How can I remove that from the file so that the final output is:... (4 Replies)
Discussion started by: aarsh.dave
4 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
Hi friends,
I have a file1.txt
1 | a | 4757634 | jund jdkj | erhyj
2 | a | 4757634 | jnd jdkj | rhje hjrhwj
i have used tr -d '\040' to remove the spcaes
output file
cat file1.txt | tr -d '\040'
1|a|4757634|jundjdkj|erhyj... (5 Replies)
Discussion started by: i150371485
5 Replies
4. Linux
hiii i have a file that contains spaces in the begining of a file till the middle the from there the txt would appear. hw can i remove those spaces and bring the text to the begining portion
file1
text starts from here (12 Replies)
Discussion started by: anurupa777
12 Replies
5. Shell Programming and Scripting
I want to remove extra spaces from variable in aix script.
We retrieve the data from oracle database and then print the values. We have a value on 90th position.
When we execute the query on sqlplus it shows the length of 90th position as 3, but when we use the same query in aix script it shows... (5 Replies)
Discussion started by: lodhi1978
5 Replies
6. UNIX for Dummies Questions & Answers
hey,
I have this file:
ATOM 2510 HG12 VAL 160 8.462 15.861 1.637
ATOM 2511 HG13 VAL 160 9.152 14.510 0.725
ATOM 2512 CG2 VAL 160 6.506 16.579 -0.088
ATOM 2513 HG21 VAL 160 5.499 16.421 -0.478
ATOM 2514 HG22 VAL 160 6.417 16.984 ... (4 Replies)
Discussion started by: kanikasharma
4 Replies
7. Shell Programming and Scripting
I'm currently writing my sql results to a file and they have trailing spaces after each field. I want to get rid of these spaces and I'm using this code:
TVXTEMP=$(echo $TVXTEMP|sed -e 's/\ //g')
It doesn't work though. I'm not familiar with sedscript, and the other codes I've found online... (6 Replies)
Discussion started by: avillanueva
6 Replies
8. Shell Programming and Scripting
Hello Folks,
I want to get the results from a SQL query which needs to be exported to a .txt file.
My Script is something like
#!/bin/ksh
db2 connect to DATABASE user user_name using pwd;
touch test.txt
isResult=0;
isResult= `db2 -x select 'ABC',COL_B from TABLE_A WHERE COL_B=CONDITION`... (6 Replies)
Discussion started by: dinesh1985
6 Replies
9. Shell Programming and Scripting
Hi All,
I have spaces in between file names.
"Material Header.txt"
"Customer Header.txt"
"Vendor Header.txt"
And how can I remove spaces between file names like below
MaterialHeader.txt
CustomerHeader.txt
VendorHeader.txt
Thanks
Srimitta (10 Replies)
Discussion started by: srimitta
10 Replies
10. Shell Programming and Scripting
Hey ,
I have a file and it's having spaces for some of the fields in it. Like the one below. I want to remove the spaces in them through out the file. The spaces occur randomly and i can't say which field is having space. So please help. Here is sample file with spaces after 5th field. (3 Replies)
Discussion started by: dsravan
3 Replies