CSD Shell script match case example written

This commit is contained in:
Mert Gör 🇹🇷 2024-06-30 13:44:47 +03:00
parent a023054732
commit f82311b62d
Signed by: hwpplayer1
GPG key ID: 03E547D043AB6C8F
2 changed files with 17 additions and 1 deletions

View file

@ -1,6 +1,8 @@
2024-06-30 hwpplayer1 <hwpplayer1@debian>
* python/csd_case_match.py: CSD shell script match case example written
* python/csd_case_match_2.py: CSD Shell Script match case example (as x) written
* Python/csd_case_match.py: CSD shell script match case example written
2024-06-23 hwpplayer1 <hwpplayer1@debian>

View file

@ -0,0 +1,14 @@
while True:
cmd = input('CSD>').strip()
match cmd:
case 'delete' | 'remove' | 'erase' as x:
print(f'silme işlemi "{x}" komutu ile yapılıyor')
case 'copy':
print('kopyalama işlemi')
case 'rename':
print('isim değiştirme işlemi')
case 'exit' | 'quit':
break
case _:
print('geçersiz komut')