Sponsored Content
Homework and Emergencies Homework & Coursework Questions How join works and the specific parameters to my problem? Post 302413286 by methyl on Thursday 15th of April 2010 06:36:46 AM
Old 04-15-2010
Working totally from your post and copying the data and the first command, mine gives output:

Code:
10015|GEOL |158|NATURAL DISASTERS|Rezaie Boroon Mohammad Hassan|1.64
10016|GEOL |158|NATURAL DISASTERS|Hamane Angelique C.|1.93
10020|ART | 101A |WORLD ART|Anderson Paul A|1.19
10021|ART | 101B |WORLD ART|Aguilar-Moreno Jose Manuel|2.59


I guess we need to know what Operating System and Shell and also version of join.

Code:
My "join" is this (According to the "what" command):

what /usr/bin/join

/usr/bin/join:
         $Revision: B.11.11_LR
         Fri Oct 27 00:58:04 PDT 2000 $



---------- Post updated at 11:36 ---------- Previous update was at 11:22 ----------

Quote:
The original data files were Excel files that the campus generated. We converted the files to CSV before extracting the information. So I only know as far as downloading the file?
We need to check the format of the data files. This "sed" just shows funny characters and record terminators. A normal unix text file will be terminated with a "newline" character which is displayed as "$" in this example.

Code:
sed -n l Courses2.txt

10015|GEOL |158|NATURAL DISASTERS|Rezaie Boroon Mohammad Hassan|$
10016|GEOL |158|NATURAL DISASTERS|Hamane Angelique C.|$
10020|ART | 101A |WORLD ART|Anderson Paul A|$
10021|ART | 101B |WORLD ART|Aguilar-Moreno Jose Manuel| $

If I deliberately make the file incorrect by converting it to Microsoft text format it will look like this. This may be enough to upset your "join" but mine still works.

Code:
sed -n l Courses2.txt

10015|GEOL |158|NATURAL DISASTERS|Rezaie Boroon Mohammad Hassan|\r$
10016|GEOL |158|NATURAL DISASTERS|Hamane Angelique C.|\r$
10020|ART | 101A |WORLD ART|Anderson Paul A|\r$
10021|ART | 101B |WORLD ART|Aguilar-Moreno Jose Manuel| \r$


Last edited by zaxxon; 04-15-2010 at 08:03 AM.. Reason: code tags, ty
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Plink problem....only works if passwd is in the script

I have a one line bat script run off a XP machine that tar's and compresses some files from a Sol 8 box. It goes something like this (a bit simplified).... plink -pw <passwd> user@host "tar -cvf - -C / tmp/a_file | compress " > a_file.tar.Z So this works....and it's worked many times. But now... (3 Replies)
Discussion started by: Yinzer955i
3 Replies

2. Shell Programming and Scripting

A join problem?

Hi everybody, I am hoping somebody here will be either be able to solve my troubles or at least give me a push in the right direction :) . I am developing a shell script to read in 4 different files worth of data that each contain a list of: username firstname secondname group score I... (2 Replies)
Discussion started by: jamjamjammie
2 Replies

3. Programming

Problem with Pipes => Only works first pipe

Hi! I'm having problems with pipes... I need comunnications with childs processes and parents, but only one child can comunnicate with parent (first child), others childs can't. A brief of code: if(pipe(client1r)<0){ perror("pipe"); } ... (1 Reply)
Discussion started by: serpens11
1 Replies

4. UNIX for Dummies Questions & Answers

problem with join

So I want to join two files that have a lot of rows The file named gen1 has 2 columns: head gen1 1008567 0.4026931012 1119535 0.7088912314 1120590 0.7093805634 1145994 0.7287952590 1148140 0.7313924434 1155173 0.7359550430 1188481 0.7598914553 1201155 0.7663406553 1206921... (2 Replies)
Discussion started by: peanuts48
2 Replies

5. UNIX for Dummies Questions & Answers

how to join two files using "Join" command with one common field in this problem?

file1: Toronto:12439755:1076359:July 1, 1867:6 Quebec City:7560592:1542056:July 1, 1867:5 Halifax:938134:55284:July 1, 1867:4 Fredericton:751400:72908:July 1, 1867:3 Winnipeg:1170300:647797:July 15, 1870:7 Victoria:4168123:944735:July 20, 1871:10 Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies

6. Shell Programming and Scripting

how to retrieve specific parameters using a xml tag

Hi, I have the following code in my xml file: <aaaRule loginIdPattern=".*" orgIdPattern=".*" deny="false" /> <aaaRuleGroup name="dpaas"> <aaaRule loginIdPattern=".*" orgIdPattern=".*" deny="false" /> I want to retrieve orgIdPattern and loginIdPattern parameter value based on... (2 Replies)
Discussion started by: mjavalkar
2 Replies

7. UNIX for Dummies Questions & Answers

Join Lines at a specific point

Hi I'm a beginner, and i've been having trouble joining two lines. I need to convert this file 1097ALABAMA Mobile County METHOMYL INSE CTICIDES 6 1.6200000E+00 1.8000001E+00 1003ALABAMA Baldwin County ... (5 Replies)
Discussion started by: kf_1434
5 Replies

8. Solaris

How to Limit ftp access parameters for specific users?

Dear friends, :) I create new user useradd -g other -d /export/home/sltftp -m -s /bin/bash -c "SLT user account for TMA ftp backup" sltftp now i need do restrict thees chmod delete overwrite rename from this user:(for all the files in the server ,sltftp user can only able to download... (4 Replies)
Discussion started by: darakas
4 Replies

9. Shell Programming and Scripting

Replacing whole string starting with specific works

Hi guys, So what I am trying to accomplish is to replace a whole string starting with some designated string. eg: When even I find a string starting with : eai.endpoint.url= replace the entire line with: eai.endpoint.url=http://www.endpoint.com/API Righ now I am trying to... (4 Replies)
Discussion started by: Junaid Subhani
4 Replies

10. Red Hat

How to join Linux pc to active directory in specific ou with authconfig?

I use authconfig command to join linux computers to AD How do I specify which OU they go in? I llook at authconfig --help but not see antyhing\ Can I use --ldapbasedn=<dn> to select what OU it should go iN (0 Replies)
Discussion started by: red888
0 Replies
SNMPDELTA(1)							     Net-SNMP							      SNMPDELTA(1)

NAME
snmpdelta - Monitor deltas of integer valued SNMP variables SYNOPSIS
snmpdelta [ common arguments ] [ -Ct ] [ -Cs ] [ -CS ] [ -Cm ] [ -CF configfile ] [ -Cl ] [ -CL SumFileName ] [ -Cp period ] [ -CP Peaks ] [ -Ck ] [ -CT ] oid [ oid ... ] DESCRIPTION
snmpdelta will monitor the specified integer valued OIDs, and report changes over time. The -Ct flag will determine time interval from the monitored entity. The -Cs flag will display a timestamp. The -CS flag causes data to be logged into a Sum file. -Cm prints the max value ever attained. -CF configfile tells snmpdelta to read it's configuration from the specified file. -Cl tells snmpdelta to write it's configuration to files. -CL specified the sum filename. -Cp period specifies the poll period. -CP peaks specifies the reporting period in number of polling periods -Ck tells snmpdelta to keep seconds in it's output time format. -CT makes snmpdelta print its output in tabular form. EXAMPLES
$ snmpdelta -c public -v 1 -Cs localhost IF-MIB::ifinucastpkts.3 IF-MIB::ifoutucastpkts.3 [20:15:43 6/14] ifInUcastPkts.3 /1 sec: 158 [20:15:43 6/14] ifOutUcastPkts.3 /1 sec: 158 [20:15:44 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:44 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:45 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:45 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:46 6/14] ifInUcastPkts.3 /1 sec: 158 [20:15:46 6/14] ifOutUcastPkts.3 /1 sec: 158 [20:15:47 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:47 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:48 6/14] ifInUcastPkts.3 /1 sec: 184 [20:15:48 6/14] ifOutUcastPkts.3 /1 sec: 184 [20:15:49 6/14] ifInUcastPkts.3 /1 sec: 158 [20:15:49 6/14] ifOutUcastPkts.3 /1 sec: 158 ^C $ snmpdelta -c public -v 1 -Cs -CT localhost IF-MIB:ifinucastpkts.3 IF-MIB:ifoutcastpkts.3 localhost ifInUcastPkts.3 ifOutUcastPkts.3 [20:15:59 6/14] 184.00 184.00 [20:16:00 6/14] 158.00 158.00 [20:16:01 6/14] 184.00 184.00 [20:16:02 6/14] 184.00 184.00 [20:16:03 6/14] 158.00 158.00 [20:16:04 6/14] 184.00 184.00 [20:16:05 6/14] 184.00 184.00 [20:16:06 6/14] 158.00 158.00 ^C $ snmpdelta -c public -v 1 -Ct -Cs -CS -Cm -Cl -Cp 60 -CP 60 interlink.sw.net.cmu.edu .1.3.6.1.2.1.2.2.1.16.3 .1.3.6.1.2.1.2.2.1.16.4 SEE ALSO
snmpcmd(1), variables(5). 4th Berkeley Distribution 12 Mar 2001 SNMPDELTA(1)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy