10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have
FILE 1 (This file has all master columns/headers)
A|B|C|D|E|F|G|H|STATUS
FILE 2
A|C|F|I|OFF_STATUS
3|4|5|4|Y
6|7|8|5|Y
Below command give me all headers of FILE 2 into array2.txt file
paste <(head -1 FILE2.txt | tr '|' '\n')>array2.txt
So I would like to compare... (2 Replies)
Discussion started by: jmadhams
2 Replies
2. Shell Programming and Scripting
Hi, I'm trying to use awk arrays to compare values across two files based on multiple columns. I've attempted to load file 2 into an array and compare with values in file 1, but success has been absent. If anyone has any suggestions (and I'm not even sure if my script so far is on the right lines)... (4 Replies)
Discussion started by: hubleo
4 Replies
3. Shell Programming and Scripting
Hi,
Using grep how to ignore multiple patterns
for example
# multiple
#installOption
#role
role
#ROLE
I want to ignore all that comes with # in a single command
If I use
grep -v \^\#"role" <filename> (2 Replies)
Discussion started by: dbashyam
2 Replies
4. UNIX for Dummies Questions & Answers
Problem
Part 1.
Gather data from linux server and output to a file named data_DDMMYY
Output file must contain the file name and size
Part 2.
Compare todays data_DDMMYY to yesterdays data_DDMMYY and output results to a file named difference_DDMMYY
Output file must show the difference in... (3 Replies)
Discussion started by: Aussiemick
3 Replies
5. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
6. Shell Programming and Scripting
Hi there, i have been trying different methods and i wonder if somebody could explain to me how i would perform a comparison on two arrays for example
my @array1 = ("gary" ,"peter", "paul");
my @array2 = ("gary" ,"peter", "joe");
I have two arrays above, and i want to something like this... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
7. Shell Programming and Scripting
Hi all,
I am trying to compare two arrays in perl using the following code.
foreach $item (@arrayA){
push(@arrayC, $item) unless grep(/$item/, @arrayB); ... (1 Reply)
Discussion started by: chriss_58
1 Replies
8. Shell Programming and Scripting
Hi there,
im having issue with comparing two variables, in a bash script.
im trying to do the following:
- get a word from user 1
- split the word into array
- get a character from user2
trying to compare the character entered by user 2 with every single character in the array... (2 Replies)
Discussion started by: new2Linux
2 Replies
9. Shell Programming and Scripting
Is there anyway that I can compare two Arrays to see if any new strings have been added in them? eg:
Array 1: Joe Bob Jane
Array 2: Joe Bob Jane Greg
It would then output a new array with the changes:
Array 3: Greg
I'm not very good at shell scripting, and my google and forum searches... (4 Replies)
Discussion started by: blckleprd
4 Replies
10. UNIX for Dummies Questions & Answers
Hi Guys,
How can I compare 2 text files and show the differences between the 2 files but have some of the text ignored?
Example
File1 File2
Thomas Thomass !1st name!
David Davidd !2nd name!
John John !3rd name!
So,... (1 Reply)
Discussion started by: jimmyflip
1 Replies