Sponsored Content
Top Forums Shell Programming and Scripting Stuck on a matching, copying type problem Post 302182683 by ag79 on Monday 7th of April 2008 10:05:42 AM
Old 04-07-2008
i see that at any point of time, you'll be handling two files. since you're familiar with awk, the following may work for you, even though I agree perl might be a better tool for the job.

for FILE_1 in file_b file_c
do

#Read file_a line by line
while read file1line
do
#Extract the column from file_b or file_c that you want to compare to in file a
coltocompare_bc=`awk blah blah`

#Here, get the column from file a
coltocompare_a=`awk blah blah`

#Here compare coltocompare_bc and coltocompare_a and do what you like.
echo "Maybe this will work, maybe not"

done < FILE_1

done
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying all files of type "pdf"

Hi, Within a shell script I'm trying to copy all the files in a directory structure to another folder but only the files of type "pdf" I have made a start but I can't work out how to finish it. find $ATEBUILD/doc/user -name "*.pdf" | xargs cp THEN WHAT? I hope this makes sense! Rob (6 Replies)
Discussion started by: milage
6 Replies

2. Shell Programming and Scripting

Problem with variable type

Dear All, I am trying to write an script to calculate geometric centre of selected residues of a protein structure. Say I have a PDB file (a text containing the x, y, and z coordinates of atoms of a protein). I want to extract the X coordinates of the atoms belonging to the interested residues... (2 Replies)
Discussion started by: siavoush
2 Replies

3. UNIX for Advanced & Expert Users

terminal type problem with cygwin on aix

hey, I use cygwin to connect to AIX 5.2 but when I open vi I get an error saying: ex: 0602-108 cygwin is not a recognized terminal type how can I fix that? I thought cygwin was tty vt100? (1 Reply)
Discussion started by: rein
1 Replies

4. UNIX for Advanced & Expert Users

Problem in copying files!!

I have requirement of one directory in /tmp area on Sun server. The area contains following files : brdcems# /tmp/.tivoli >>ls -lt total 0 srwxrwxrwx 1 root other 0 Nov 16 13:41 a9c30c14-80bf256e-94 srwxrwxrwx 1 root other 0 Nov 12 12:28 a9c30cc8-80bf256e-94 I... (4 Replies)
Discussion started by: ssk
4 Replies

5. SCO

Sco 6 copying problem

We are using GTAR for daily copies of our database using Travan cartridges (Tapestor drive)and are having intermittent problems. Some days it does not copy and we can't figure out why. Sometimes it seems to be hanging and a tape status command doesn't return anything. Other times it doesn't copy... (0 Replies)
Discussion started by: Yrr88
0 Replies

6. UNIX for Dummies Questions & Answers

Stuck with a simple find problem

Hi, Need some simple find help. I need to search for all .so files within sol directory. My directory tree has mix of directories and i want to search only inside sol directory. I could get this done combining find with for, any option to do this with find alone. for a in `find .... (13 Replies)
Discussion started by: vibhor_agarwali
13 Replies

7. Shell Programming and Scripting

Find problem listing directories even -type f

Hi All, #!/bin/ksh find /home/other -ls -type f -xdev | sort -nrk7 | head -2 >bigfile.txt The above is my script, which writes the large file into a file called bigfile.txt. My script contains only the above two lines. after execution i am getting the output like find: cannot chdir to... (1 Reply)
Discussion started by: Arunprasad
1 Replies

8. Shell Programming and Scripting

Problem with type-casting in awk

Hi I'm trying to write a script which takes an integer as input and checks for files with size > input and displays it on screen. The code I've tried : echo 'Enter the min file size expected' read filesize du -ah <folder name> | awk -F: '$1>int(filesize) {print $1,$2)' is always... (28 Replies)
Discussion started by: vivek.bharadwaj
28 Replies

9. Shell Programming and Scripting

korn shell display lenght problem!!! i got stuck on this

Using the KSH, write a shell script called display_by_length, which takes an absolute pathname to a directory and displays all ordinary files in the directory ordered by their length; for each file listed, display the name of the file and its length - nothing else. Extend this script to take an... (1 Reply)
Discussion started by: babuda0059
1 Replies

10. Shell Programming and Scripting

Type casting problem

hi guys, i m new to shell script.. i dont know how to type cast string into integers and i mention my problem below.. date="21091988" month=$((${date:2:2})) # extract the month from previous date variable temp=$(($month*23)) when i am trying to calculate the temp value i got the... (5 Replies)
Discussion started by: raadhaakrishnan
5 Replies
MRTG-FORUM(1)							       mrtg							     MRTG-FORUM(1)

NAME
mrtg-forum - Interactive Help for MRTG users SYNOPSIS
There is a lot of written documentation for mrtg, but nevertheless you may have a problem where you can't find the solution. In this case some Human Help may be necessary. With MRTG there are several ways to get Humans to help you. MAILING-LIST There are three mailing lists for MRTG available. mrtg for discussion among mrtg users. mrtg-announce for announcements regarding new versions of mrtg related software. mrtg-developers for discussion among people who write software in connection with mrtg or who hack mrtg itself. THE RULES Please note that the memebers of the mrtg mailinglist value politeness highly. This means behave in a way you would like others to behave towards you. o No shouting. (NO CAPS) o No rude language o No demands. everybody is on the list out of their own free will. If you do not get an answer to your question, chances are high that you did not give sufficent details about the nature of your problem or that the answer to your problem is in the documentation. o If you do not follow the rules you will be unsubscribed from the list with no further questions asked. o Decisions about your unsubscription from the list will be taken by Alex van den Bogaerdt <alex at ergens.op.het.net> Paul C. Williamson <pwilliamson at MANDTBANK.COM> If you feel that you have been treated unfairly, you may send mail to me and explain the situation. Tobi Oetiker <tobi@oetiker.ch> SUBSCRIBING These lists are managed by a mailing-list management program (listar). It allows you to subscribe to these lists by sending a message with the subject: subscribe to the following address: listname-request@lists.oetiker.ch You will then get a message asking you to confirm your subscription. For posting to the lists use the following address listname@lists.oetiker.ch Note that only people who are subscribed to the list can post. Further information about the usage of the mailing lists is available by sending a message with the subject line help to either one of the request addresses. There is also a webinterface to the lists on http://lists.oetiker.ch List archives are on http://www.mail-archive.com/index.php?hunt=mrtg and http://gmane.org/find.php?list=mrtg NEWSGROUP
For discussion of MRTG or related topics on the Usenet, please send your posts to: news:comp.dcom.net-management Many MRTG users are in this forum and will help you. You can also find an archive of past activity from this Newsgroup on: http://groups.google.com/group/comp.dcom.net-management IRC Channel For discussion of MRTG and related topics on IRC, the `#mrtg' channel on EFNet has been created. More information can be found at http://mrtg.easymac.org MRTG Japan There is a special Mailinglist for MRTG Users in Japan. It carries translations of the traffic from MRTG-ANNOUNCE as well as updates on the Japanese Translation of the MRTG documentation. Go to http://www.mrtg.jp/ for further Information. AUTHOR
Tobias Oetiker <tobi@oetiker.ch> and many contributors 2.17.4 2012-01-12 MRTG-FORUM(1)
All times are GMT -4. The time now is 08:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy