For example:
/A/B/C/D/
I know that this command:
awk -FS'/' '{print $1}'
Prints the first pattern: A
But, how can I count the number of ‘/’ inside that phrase? The output will be: 5
1
For example:
/A/B/C/D/
I know that this command:
awk -FS'/' '{print $1}'
Prints the first pattern: A
But, how can I count the number of ‘/’ inside that phrase? The output will be: 5
1