Q:

Add a specific word to end of line

I want to add specific word in end of the line in my file. 
My file is mac.txt containing,
00-1E-B8-05-7C-74

I want to add :p=abcde to the end. 
I tried:
cat mac.txt | sed '$/:p=1234' > mac2.txt
cat mac.txt | sed -e 's/$/:p=1234/' > mac2.txt
sed 's/$/:p=1234/' mac.txt > newmac.txt
sed 's/\(.*\)/\1:p=1234/' < mac.txt > outfile.txt

but what they are doing is adding text to next line like
00-1E-B8-05-7C-74
:p=abcde

I want my output to be:
00-1E-B8-05-7C-74:p=abcde

A:

With awk you can do this:
awk '/00-1E-B8-05-7C-74/ {$0=$0":p=abcde"} 1' file
00-1E-B8-05-7C-74:p=abcde

It will add :p=abcde after lines with 00-1E-B8-05-7C-74

Update:
awk '$0~m {$0=$0":p=abcde"} 1' m=$(cat mac.txt) file

