Search Results

Search: Posts Made By: Hamss
2,889
Posted By RudiC
If you want the regex to match the fingerprint,...
If you want the regex to match the fingerprint, try:sed -rn 's/.*(([A-F0-9]{2}:){15}[A-F0-9]{2})/\1/p' file
This does not necessarily work with all sed versions, and, as pointed out before, it...
2,889
Posted By RavinderSingh13
Thank you Scrutinizer for explaination. Here is...
Thank you Scrutinizer for explaination. Here is one more approach for same.


$ awk '/system@remote-server, Dec 17, 2013, PrivateKeyEntry,/ {getline; gsub(/Certificate fingerprint/,...
2,889
Posted By disedorgue
In your hash, I doubt you have :MF: In general,...
In your hash, I doubt you have :MF:
In general, it's a serie of hex digit.
Your pattern 2 is not pattern 1 0-infinite times, you can simplified your pattern 2 as: ([A-Z0-1:]*)
If you want pattern...
2,889
Posted By Scrutinizer
Some more: awk 'f{print $NF; f=0}...
Some more:
awk 'f{print $NF; f=0} /system@remote-server/{f=1}' file

sed '/system@remote-server/!d;N;s/.* //' file
2,889
Posted By Scrutinizer
Sure: awk ' f{ # if...
Sure:
awk '
f{ # if f=1 then (if a match was found previously)
print $NF # print the last field
f=0 # reset f ( set found is...
2,889
Posted By Akshay Hegde
$ cat file vi 2, Dec 7, 2012, trustedCertEntry,...
$ cat file
vi 2, Dec 7, 2012, trustedCertEntry,
Certificate fingerprint (MD5): F9:1F:FE:E6:A3:CB:99:88:44:D4:67:ED:G5:F8:97:7A
system@remote-server, Dec 17, 2013, PrivateKeyEntry,
Certificate...
2,889
Posted By in2nix4life
sed -n '/system@remote-server/{n;s/.* //p}' file ...
sed -n '/system@remote-server/{n;s/.* //p}' file

2A:DD:4B:C5:AD:B0:MF:96:51:B0:14:4A:B5:6C:99:FB
2,889
Posted By disedorgue
Hi, In sed: sed -n -e...
Hi,
In sed:
sed -n -e '/system@remote-server.*PrivateKeyEntry/,/Certificate fingerprint/{/system@remote-server.*PrivateKeyEntry/d;s/.* \([0-9A-F]\+:\)/\1/p;}'

Simplified:
sed -n -e...
2,889
Posted By RavinderSingh13
Hello, Could you please use the following...
Hello,

Could you please use the following code for same.



awk '/system@remote-server, Dec 17, 2013, PrivateKeyEntry,/ {getline; print $0}' file_name | sed 's/Certificate fingerprint...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 10:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy