Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How to compare two files called "A.sh" and "B.sh" in unix shell script and the third file "C.sh" should contains the contents of "B.sh" which r not in "A.sh".
I tried the same thing. I created a file named 'a' with contents 12345
and file 'b' with contents 123.
This command gave me the common elements of both.
all ur answer r working fine..thnx
but for my script below,
for i in `cat fileA`
do
grep $i fileB
if [ $? -eq 0 ]
then
{
echo $i >> filec
}
fi
done
I don't want to print in screen i.e., instead of echo cmd above, i want to redirect to filec..
The abve script is working fine while using echo..but in filec its showing only last ele..
Plz edit the above script & send me as i need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.