PoshCode Archive  Artifact [c4e9474e46]

Artifact c4e9474e4665f91ebcd9d74dabb9e6903802ac2070c19b1da3dca963e82955ac:

  • File Correction.ps1 — part of check-in [68c9d8b062] at 2018-06-10 14:00:37 on branch trunk — $menu = " (user: Klaus Schulte size: 1293)

# encoding: ascii
# api: powershell
# title: Correction
# description: $menu = "
# version: 0.1
# type: script
# author: Klaus Schulte
# license: CC0
# x-poshcode-id: 5750
# x-archived: 2015-04-24T02:06:04
# x-published: 2015-02-21T15:48:00
#
# =============================
# conference 2015 book sales
# =============================
# 1. Book Title
# 2. Book discription
# 3. book id
# 4. Book List Price
# 5. display Sales Info
# 6. Write to File
# 7. Exit Program
# ==============================
# "
# switch ($responce)
# {
# 1 { [string] $title=read-host “enter title”
# if ($title -match ‘\w’) {continue}
# else {write-warning “`@ enter a valid title…”
# pause
# break
# }
#
$menu = @"
=================================
      conference 2015 book sales
=================================
    1. Book Title
    2. Book discription
    3. book id
    4. Book List Price
    5. display Sales Info
    6. Write to File
    7. Exit Program
==================================
"@

switch ($responce)
{
    1 { [string] $title=read-host "enter title"
            if ($title -match '\w') {continue}
                else {write-warning "`@ enter a valid title..."
                pause
                break
                }