Timeline for How to extract last part of string in bash?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 15, 2023 at 11:36 | history | edited | mwfearnley | CC BY-SA 4.0 |
added 215 characters in body
|
Nov 13, 2023 at 10:32 | comment | added | mwfearnley |
Do you know what the extension would be? If e.g. it's .conf , you could do ${A%.conf} . That will leave the string intact if it doesn't end in .conf .
|
|
Nov 13, 2023 at 10:01 | comment | added | sayanel |
Is there a solution to remove last extension but do nothing if no extension, on path like my.path/noext ? It does happen on /etc/*.d/ for example
|
|
Apr 1, 2022 at 11:13 | history | edited | mwfearnley | CC BY-SA 4.0 |
added 241 characters in body
|
May 21, 2021 at 11:43 | history | edited | mwfearnley | CC BY-SA 4.0 |
Try and make answer more helpful
|
Mar 9, 2020 at 13:12 | history | edited | mwfearnley | CC BY-SA 4.0 |
Swap order
|
Jan 7, 2020 at 13:06 | history | answered | mwfearnley | CC BY-SA 4.0 |