10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I like to intersect two files based on their first columns. Here is the code which does the trick for me:
awk 'NR==FNR{A;next}$1 in A' file1 file2
However, this only looks for exact matches between the two files in the first column. I need them to be printed even if part of the string... (10 Replies)
Discussion started by: a_bahreini
10 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'd like to intersect two files by the 4th col of the first file and 6th col of the second file. This is the code I use:
awk 'NR==FNR{A;next}$6 File1 File2
However, this is only outputting the second file lines. I'd like to have both lines in a single line separated by a tab.
Thanks in... (25 Replies)
Discussion started by: a_bahreini
25 Replies
3. Shell Programming and Scripting
I want to erase some php code between a <? and a ?> in HTML containing a keyword, the problem is it finds the last > and wipes out everything before it
how do i specify for it to stop searching after the first >?
perl -i -p0e 's/<\?php.*keyword.*\?>//s'
there's many lines of php code... (2 Replies)
Discussion started by: vanessafan99
2 Replies
4. Shell Programming and Scripting
can someone help me how do i do this..
Display user id, first and last names of all the members of your CIS132 class in alphabetical
order by last name.
Hint:
• All classmate names are in the file /etc/passwd
• the first 5 characters in the user id are the same for all class members. (s132a) (1 Reply)
Discussion started by: an2up
1 Replies
5. Web Development
Hi,
A piece of script from Perl-cookbook I do not understand, and post here for explanation.
The purpose is to find the element in either array (union), and in both array (intersection). Thank you in advance.
@a=qw(1 3 5 6 7 8);
@b=qw(2 3 5 7 9);
foreach $e (@a, @b) {$union{$e}++ &&... (3 Replies)
Discussion started by: yifangt
3 Replies
6. Shell Programming and Scripting
How can find the intersection between files
for Example:
file1
entry1
entry2
entry3
entry33
file2
entry2
entry4
entry5
.
.
.
.
the output should be
entry2 (9 Replies)
Discussion started by: makrami
9 Replies
7. UNIX for Dummies Questions & Answers
if i know the ip of a computer on the subnet, it it possible to findout the username of the user that is using that system? (4 Replies)
Discussion started by: purest
4 Replies
8. Shell Programming and Scripting
Hello folks
I have a text file abcd.txt and has a line starting with number '8'.
I have a string in this line starting at position 'a' to position 'b'
also this string is a number and have to be reduced by 1. there is also a problem that it has to be padded with zeros to make the string... (2 Replies)
Discussion started by: sandyg
2 Replies
9. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
10. UNIX for Dummies Questions & Answers
HellOooO,
How I can find how delete a drictory in the system.If there's 2 root one of them outside the country but we have WAN so he can access the network from outside >>>> we are using same account so how I can know who done it I want to proof that.
Regards (5 Replies)
Discussion started by: geoquest
5 Replies