CSD Shell script match case example written

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

View file

@ -1,3 +1,7 @@
2024-06-30 hwpplayer1 <hwpplayer1@debian>
* python/csd_case_match.py: CSD shell script match case example written
2024-06-23 hwpplayer1 <hwpplayer1@debian> 2024-06-23 hwpplayer1 <hwpplayer1@debian>
* python/match.py: match example * python/match.py: match example

13
python/csd_case_match.py Normal file
View file

@ -0,0 +1,13 @@
while True:
cmd = input('CSD>').strip()
match cmd:
case 'delete' | 'remove' | 'erase':
print('silme işlemi')
case 'copy':
print('kopyalama işlemi')
case 'rename':
print('isim değiştirme işlemi')
case 'exit' | 'quit':
break
case _:
print('geçersiz komut!')