?16? ?7? Shell???? 7.1 Shell???? ???????? - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

?16? ?7? Shell???? 7.1 Shell???? ????????

Description:

16 7 Shell 7.1 Shell Shell Shell ... – PowerPoint PPT presentation

Number of Views:99
Avg rating:3.0/5.0
Slides: 15
Provided by: asd103
Category:
Tags: bash | linux | shell

less

Transcript and Presenter's Notes

Title: ?16? ?7? Shell???? 7.1 Shell???? ????????


1
?16??7? Shell????7.1 Shell????????????
2
? ?
  • ???Shell???
  • ??????Shell???
  • ?????????Shell???

3
???1????
  • Geecy???????????Tom???????????????????????????C??
    ??????????,?????????????????????,??????????1???-
    ?-?,?2?????

4
???1????(?)
  • date??????????
  • ?? ? ? ??? ?? ?
  • ??,Tom???????,???????????,????date??,???????,?????
    ??????????date???????????????????1??,?????????????

5
???1???
  • ?????????????????????
  • (1)???????
  • ????date??,???????,???vi???????,????????????,???
    ????C???????
  • ?????date????????????????1??,?????????,?????????
    ??

6
???1???
  • ?????????????????????
  • (1)???????
  • (2)??????
  • ?????????????,??????,???????????????,??????????
  • date cut -f2,3,6 -d " tr " " "-" gt
    data.txt
  • date cut -f4 -d " " cut -f1,2 -d "" gtgt
    data.txt

7
???1???(?)
  • ????????????,?????
  • ???,??????Shell???????????

8
7.1.1 ??Shell??
  • ???????????????????,????????????????????
  • ??????????
  • ?????????Shell??(Shell Script)??????
  • ????????????????shell???????????,??????????
  • ?????????????shell???????????,????????????????

9
7.1.2 ??????
  • ??vi???????fist_script
  • vi first_script
  • ????????
  • ls -F /
  • date
  • ???????vi?

10
7.1.3 ????
  • ???????????Shell????????
  • bash first_script
  • ????????????shell??,???bash,????????
  • ???shell?????????first_script,????????????,???????
    ?
  • ???????????????,?????shell???????,??????????shell?
    ???

11
7.1.3 ????(?)
  • ???????????,???????????????????shell,??,??????,???
    ????
  • !/bin/bash --??!????????????,????shell??????
  • ???????FAP,????????????
  • chmod ux first_script
  • ??,???????????????./first_script

?????
12
7.1.3 ????(?)
  • ????????./first_script ??./
  • ????????PATH??????????,??????./?????????????????
    ???????
  • ??,?????????????????????????????????
  • ???????/etc/shell??????????shell????????

13
7.1.4 ????
  • ???????,?????????????????(Comment)?
  • ???????????,?Shell????????????,????,????????
    ??

14
???1?????
  • 1????vi?????update
  • 2????????
  • 3????update??????chmod ux update
  • 4???????????update??????????data.txt

!/bin/bash Add a formatted string of date to data.txt date cut -f2,3,6 -d " " tr " " "-" gt data.txt Add a formatted string of time to data.txt date cut -f4 -d " " cut -f1,2 -d "" gtgt data.txt Display the content of data.txt cat data.txt
Write a Comment
User Comments (0)
About PowerShow.com