Unix 2 - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Unix 2

Description:

sleep sleep little girl. 4. awk. ???? ???? shir.txt: there between sand and. pure piece of peace ... sleep sleep little girl. 5. awk % awk {print NR}' shir.txt ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 16
Provided by: sado
Category:
Tags: unix

less

Transcript and Presenter's Notes

Title: Unix 2


1
Unix 2 Makefiles
  • ????? ???? ???

2
Agenda
  • More about awk
  • loops
  • argc argv
  • Makefile

3
awk
  • ???? ???? shir.txt
  • there between sand and
  • pure piece of peace
  • was found Sleep honey
  • sleep sleep little girl

4
awk
  • ???? ???? shir.txt
  • there between sand and
  • pure piece of peace
  • was found Sleep honey
  • sleep sleep little girl

5
awk
  • awk print NR shir.txt
  • 1
  • 2
  • 3
  • 4

6
awk
  • awk print NF shir.txt
  • 4
  • 4
  • 4
  • 4

7
awk
  • awk print NF "--" 2 shir.txt
  • 4--between
  • 4--piece
  • 4--found
  • 4--sleep

8
awk
  • line2
  • awk lnlineprint ln shir.txt
  • between
  • piece
  • found
  • sleep

9
loops
  • while count -gt 0
  • do print "\count is count"
  • (( count - 1 ))
  • done

10
Argc argv
  • include ltiostreamgt
  • using namespace std
  • int main(int argc, char argv)
  • for (int i 1 iltargc i)
  • cout ltlti ltlt" " ltltargvi ltltendl
  • return 1

11
Argc argv
  • Stam.exe a ab abc
  • 1 a
  • 2 ab
  • 3 abc

12
Makefile
  • ?????
  • A comment
  • hello.exe hello.cpp
  • cl hello.cpp

13
Makefile
  • ?????
  • CPP cl
  • hello.exe hello.cpp
  • (CPP) hello.cpp

14
Makefile
  • ?????
  • CPP cl
  • .SUFFIXES .exe .cpp
  • .cpp.exe
  • (CPP) lt

15
Makefile
  • ?????
  • CPP mycompiler
  • .SUFFIXES .exe .cpp
  • .cpp.exe
  • (CPP) lt
  • target1.exe
Write a Comment
User Comments (0)
About PowerShow.com