Quote:
Originally Posted by
ahinkebein
OK... I am back to work... The last post talking about spaces... I tried but I am still getting the same result... Do spaces matter that much... I know whitespace makes a difference but there has to be a reason why it is not pulling from the second file using the delimiter.
Hi, which quotes are you using (single, double, back)?, what shell are you using? and what O/S are you using?
I'll include output below from a test run without spaces, and with spaces, running on Solaris 10 using a Bash shell
-bash-3.00$ ls -l
total 4
-rw-r--r-- 1 dhoward other 144 Feb 4 07:27 temp113-lat.txt
-rw-r--r-- 1 dhoward other 144 Feb 4 07:28 temp113-lon.txt
-bash-3.00$
-bash-3.00$ paste -d''temp113-lat.txt temp113-lon.txt > 113latlon.txt
-bash-3.00$ cat 113latlon.txt
5104.146495
5103.428400
5103.305700
5103.446300
5103.442100
5103.538900
5103.875200
5104.080100
5105.286800
5105.493300
5105.901000
5106.284000
-bash-3.00$ paste -d ' ' temp113-lat.txt temp113-lon.txt > 113latlon2.txt
-bash-3.00$ cat 113latlon2.txt
2644.989500 5104.146495
2645.791200 5103.428400
2647.358600 5103.305700
2647.358300 5103.446300
2647.338700 5103.442100
2647.307900 5103.538900
2647.312100 5103.875200
2647.240400 5104.080100
2647.000300 5105.286800
2646.618800 5105.493300
2646.472100 5105.901000
2646.358800 5106.284000
-bash-3.00$
As you can see the spaces do matter, as does the type of quotes, in the above examles i have used the single quotes('), in the following examples, I am using the backquotes (`) and the double quotes (").
-bash-3.00$ paste -d ` ` temp113-lat.txt temp113-lon.txt > 113latlon3.txt
-bash-3.00$ cat 113latlon3.txt
5104.146495
5103.428400
5103.305700
5103.446300
5103.442100
5103.538900
5103.875200
5104.080100
5105.286800
5105.493300
5105.901000
5106.284000
-bash-3.00$ paste -d " " temp113-lat.txt temp113-lon.txt > 113latlon4.txt
-bash-3.00$ cat 113latlon4.txt
2644.989500 5104.146495
2645.791200 5103.428400
2647.358600 5103.305700
2647.358300 5103.446300
2647.338700 5103.442100
2647.307900 5103.538900
2647.312100 5103.875200
2647.240400 5104.080100
2647.000300 5105.286800
2646.618800 5105.493300
2646.472100 5105.901000
2646.358800 5106.284000
-bash-3.00$
The backquotes return only one set of values. from the second file