tag:blogger.com,1999:blog-1610041778732887994.post8538412997619757608..comments2023-07-21T09:16:48.778-07:00Comments on Levent Serinol's Blog: arrays in bash shell - Part 2Anonymoushttp://www.blogger.com/profile/06161379979453710759noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-1610041778732887994.post-67484079945427923482013-01-25T13:59:04.367-08:002013-01-25T13:59:04.367-08:00Lets say I have the following array:
# myarray=(b...Lets say I have the following array:<br /><br /># myarray=(bigcar smallcar car truck)<br /><br />Now I only want to delete elements that are exactly "car". Is there a way to do that using the following syntax: <br /><br /># ${myarray[@]/car/}<br /><br />without modifying the other elements of the array?Anonymousnoreply@blogger.com