ファイル名の先頭から単一文字を削除します。

ファイル名の先頭から単一文字を削除します。

ファイル名:

_10_-_Overriding_or_customizing_the_rest_end_point-rkkfgI502f0.mp4
_11_-_Expose_ids_in_json_response-CrDXtLfiZos.mp4
_12_-_Create_angular_8_project_using_Angular_CLI-kSXkW1hF0KU.mp4
_13_-_Create_a_model_class_for_Book_entity-Hfm3da1Ze8E.mp4
_14_-_Display_the_list_of_books_in_html_table_with_hard-coded_values-b5R8CsMrOO4.mp4
_15_-_Create_a_new_book-list_component_and_display_the_book_images-Tto3r229fFA.mp4
_16_-_Make_a_HTTP_GET_request_to_the_Spring_boot_application-98RfVQ9Z3ZM.mp4
_17_-_Understanding_the_Observable_and_Observer-NKLirs5SFYk.mp4
_18_-_Call_a_service_method_to_get_the_book_array-yQ34aPdH1_0.mp4
_19_-_Fix_the_error_CORS_policy_and_display_the_data_in_html_table-YSEAdODxMfE.mp4
_1_-_Course_Introduction-b4pjjftApmY.mp4
_20_-_Replace_the_blank_images_with_real_images-fut1f40FHo4.mp4
_2_-_Setup_the_development_environment-RbUGvRAUpSM.mp4
_3_-_Setup_the_MySQL_database-D3krImBhofo.mp4
_4_-_Create_repository_in_Github_and_add_it_to_Eclipse_IDE-MAkVtB_MhzI.mp4
_5_-_Create_spring_boot_project_using_spring_initializer-GsmqGxEv6rg.mp4
_6_-_Configure_application_properties_and_commit_changes_to_github-HqDZKih-Ehk.mp4
_7_-_Create_an_entity_class_for_book_table-pfxt3BeU_e0.mp4
_8_-_Create_an_entity_class_for_book_table-eg1pJJLAzAQ.mp4
_9_-_Create_rest_repositories_for_book_and_category_entity-w7vFTSCWCOM.mp4

_ファイル名の先頭から単一の文字を削除する方法は?

ベストアンサー1

このファイルを含むディレクトリーから以下を発行します。

for file in _*; do mv "$file" "${file#_}"; done

${file#exp}exp最初からパターンに最も短く一致するものを削除しますfile

おすすめ記事