Search Results

Search: Posts Made By: Yoda
4,187
Posted By Yoda
/[^/]+/ - if record has one or more occurrence of...
/[^/]+/ - if record has one or more occurrence of any character other than / (to exclude root fs)

sub(/\/$/,X) - substitute or replace / in the end with X which is null or undefined variable.
...
4,187
Posted By Yoda
Another approach:- awk '/[^/]+/{sub(/\/$/,X)}1'
Another approach:-
awk '/[^/]+/{sub(/\/$/,X)}1'
Showing results 1 to 2 of 2

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