Exercises for automating build system

Exercises:

  1. Print ‘Hello’
  2. Print ‘Hello <name>’ with <name> is passed as parameter.
  3. Create a target Hello which say “Hello <name>” which name is a property.
    Write a target that 1) define <name> value, then 2) to call target Hello.
  4. Copy1 file from src folder to dest folder.
  5. Copy many files from src folder to dest folder (keeping the hierarchy structure).
  6. (search and replace files by filename)
    Find all files in folder srcDir whose names are all searchFile.txt (recursively), and replace them by a given file named replaceFile.txt. All the replaced files are put in a backup folder named backupDir (keeping the files ‘s hierarchy). If no backup folder is specified, proceed search & replace without back-up.

    (rollback search & replace)
    Find all files in folder backupDir whose names are all searchFile.txt and copy them to the srcDir folder (keeping the heirarchy of the files).

  7. For each file extension in src folder, print the files having that extension.
  8. Copy files from src folder to dest folder. Put the files into sub folders whose name are the file extensions.
    For example, given that in the src folder there are only two extensions .txt and .xml. Then, the files will be copied into txt and xml folders which are sub folder of dest folder.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: