ksh / AIX - Differences between lists to a text file
This seems pretty simple, but I cant figure it out. I get stumped on the simple things.
I am running two commands
1) take a listing a directory of files, and filter out the doc_name (which is in a series of extracted files), and place it in a file.
2) I then have a list of expected files that should have been retrieved -
3) My desired output is a listing, something along the lines of -
I've tried using a variety of diff, sort, etc.. But I figure that there's a way to use sed/awk to do this, but of which I am a newbie with. Can someone point me in the right direction.
thanks in advance.
I will try both of these. I think that both of these solutions are great, and my biggest issue right now is that I am overthinking. I appreciate the feedback
I'm a bit confused what you are trying to do with more Expected.del | cut -d, -f1 >> Original.out You might really want just cut -d, -f1 Expected.del >> Original.out
The more command is not the right tool. At a push, maybe cat that that is also wasteful (search for uuoc in your favourite search engine). It is far better to just use the processing command you choose to read the file rather than push it in through a pipe. It will slow down your processing if you have large files and worse if you repeat the process several times.
fgrep -v -x -f is more precise than grep -v -f because it compares the full lines.
For ex bc should not match abc or bcd.
(A halfway approach would be grep -v -w -f that at least checks for word boundaries.)
This User Gave Thanks to MadeInGermany For This Post:
Greetings all, I have two output lists from a log that I am working with. Below are the examples. except, the lists are in the thousands.
list1.out
FEA1234
FEA4343
FEA3453
FEA3413
FEA34A3
FEA3433
....
list2.out
FEA1235 (3 Replies)
Not really sure how to accomplish this. If I have two lists with matching columns. Second column is different. I would like to show the differences plus/minus.
list1
device1 5
decive2 10
decive3 10
device4 10
device5 10
device6 20
list2
device1 10
... (1 Reply)
Why does dot sourcing of ksh functions behave so differently between AIX, Solaris, and Linux? How can I make Linux behave the way I want in the test I show below?
I have a library of interdependent functions I have developed and use in ksh in AIX. They also run in Solaris. Now I am migrating... (9 Replies)
I have a list of files that should contain the following
Im trying to find the items of interest that are missing from each file and create a csv.
cat *.txt | while read file
do
grep 3500 file | tr '\012' ','
done
My problem is this possible output
one.txt ... (2 Replies)
I have started a new job which requires AIX admin skills, which I have, and RHEL skills. Does anyone have a cheat sheet that if I know how to solve the problem in AIX how would I do that in RHEL? I was an IBM pre-sales technical trying to keep sales guys honest - not possible. Any other links to... (5 Replies)
Hello, I have a pretty simple question, but I am new to Python and am trying to write a simple program. Put simply, I want to take a text file that looks like this:
11111 22222
33333 44444
55555 66666
77777 88888
and produce two lists, one containing the contents of the left column, one the... (0 Replies)
Hi,
I'm trying to create a script to catch a process which is consuming high CPU which I have pretty much done but it's just finding the correct place to pull the current CPU for that process.
When viewed in Topas it's consuming 99.*% cpu
But if I try using
ps avg or ps -eo pcpu
... (5 Replies)
Hi
i have gone through some sdiff command it shows the differences side by side and its really awesome
file 1:
this tool is for
checking the differ
merging with flower pots documentation
file 2:
this t ool is for
checking the differ
mergin g with flower pots documentation
... (27 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
Hi,
I am running OpenBSD 3.7, my first attempt with this OS. I noticed that both /bin/sh and /bin/ksh are both really the pdksh. Yet each has its own manpage. I was wondering what are the differences b/w the two programs on OpenBSD. I.e., has the team configured pdksh to function one way if... (3 Replies)