10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've tried various solutions to move a file name with spaces and nothing seems to work. I need to take a date as input, prepend it to a filename with spaces then remove the spaces and mv the file to the new name.
#!/bin/ksh
#
if (( $# != 1 ))
then
echo "Usage: `basename $0` <DATE> "
... (5 Replies)
Discussion started by: w_s_s
5 Replies
2. 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
3. Shell Programming and Scripting
Hi i have a file in which i am doing some processing.
The code is as follows:
#!/bin/ksh
grep DATA File1.txt >> File2.txt
sed 's/DATA//' File2.txt | tr -d ‘ ‘ >> File4.xls
As you can see my output is going in a xl file.The output consist of four columns/feilds out of which the first... (20 Replies)
Discussion started by: Sharma331
20 Replies
4. 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
5. 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
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
hi
i have a file which store some data.the contents of my file is
data1:data2
data3:data4
i have a script which read this file
correct="$(cat /root/sh | cut -d: -f1)"
i used this syntax..please help me which syntax is used to remove blank spaces..then how to read this file.. (1 Reply)
Discussion started by: shubhig15
1 Replies
8. Shell Programming and Scripting
Hi Friends,
I have large volume of data file as shown below.
Beganing or end of each filed, there are some blank spaces.
How do I remove those spaces?
AAA AAA1 | BBB BB1 BB2 |CC CCCC
DDDD DD | EEEEEEE EEEEEEEE | FFF FFFFFF FFFF
GG GGGGGG |HH HH ... (3 Replies)
Discussion started by: ppat7046
3 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
Hi,
I have a source file as mentioned below: I want to remove all the extra spaces between the fields.
a b--------|sa df-------|3232---|3
sf sa------|afs sdf-----|43-----|33
a b c------|adfsa dsf---|23-32|23
*Here '-' idicates spaces
Now, I want output as below:
a b|sa df|3232|3... (7 Replies)
Discussion started by: srilaxmi
7 Replies