I need to launch something, to verify a file.
A text separated in two fields by a comma,
on the second field we may find /*/*/* which is data I want.
I want to discard /*/* only
Input file
\\CIFSERVER1\Share1,/fs1_casa/c/share1
\\CIFSERVER1\Share2,/fs2_casa/c/share2
\\CIFSERVER1\Share3,/fs1_casa/c/share3
\\EDULIN\edu,/edu1
\\CIFSERVER2\root,/fs1_casa
\\CIFSERVER2\root,/fs2_casa
\\CIFSERVER2\root,/fs3_casa
\\CIFSERVER2\root,/fs1_casa
Output should be:
\\CIFSERVER1\Share1,/fs1_casa/c/share1
\\CIFSERVER1\Share2,/fs2_casa/c/share2
\\CIFSERVER1\Share3,/fs1_casa/c/share3
What should be removed?
\\EDULIN\edu,/edu1
\\CIFSERVER2\root,/fs1_casa
\\CIFSERVER2\root,/fs2_casa
\\CIFSERVER2\root,/fs3_casa
\\CIFSERVER2\root,/fs1_casa
If you are trying to print all lines that contain more than 3
/after a single,you could just do:To restrict to those lines containing exactly 3
/:If you must restrict the search to the second field (eg, there may be more than 1 comma):
or