From 0a1eebbd0eb8c05efc2d2edd72f0e14e56e6fe47 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 9 Sep 2020 11:22:31 -0500 Subject: [PATCH 01/86] INIT --- .freeCodeCamp/.mocharc.json | 8 + .freeCodeCamp/package-lock.json | 822 ++++++++++++++++++++++++++++++++ .freeCodeCamp/package.json | 18 + .freeCodeCamp/reset.sh | 0 .freeCodeCamp/setup.sh | 3 + .freeCodeCamp/test/10.test.js | 10 + .freeCodeCamp/test/100.test.js | 11 + .freeCodeCamp/test/1000.test.js | 12 + .freeCodeCamp/test/1010.test.js | 11 + .freeCodeCamp/test/1020.test.js | 10 + .freeCodeCamp/test/1030.test.js | 10 + .freeCodeCamp/test/1040.test.js | 10 + .freeCodeCamp/test/1050.test.js | 10 + .freeCodeCamp/test/1060.test.js | 11 + .freeCodeCamp/test/1070.test.js | 11 + .freeCodeCamp/test/1080.test.js | 10 + .freeCodeCamp/test/1090.test.js | 10 + .freeCodeCamp/test/110.test.js | 11 + .freeCodeCamp/test/1100.test.js | 10 + .freeCodeCamp/test/1110.test.js | 10 + .freeCodeCamp/test/1120.test.js | 11 + .freeCodeCamp/test/1130.test.js | 11 + .freeCodeCamp/test/1140.test.js | 11 + .freeCodeCamp/test/1150.test.js | 12 + .freeCodeCamp/test/1160.test.js | 10 + .freeCodeCamp/test/1170.test.js | 10 + .freeCodeCamp/test/1180.test.js | 10 + .freeCodeCamp/test/1190.test.js | 10 + .freeCodeCamp/test/1200.test.js | 11 + .freeCodeCamp/test/1210.test.js | 11 + .freeCodeCamp/test/1220.test.js | 10 + .freeCodeCamp/test/1230.test.js | 11 + .freeCodeCamp/test/1240.test.js | 10 + .freeCodeCamp/test/1250.test.js | 10 + .freeCodeCamp/test/1260.test.js | 11 + .freeCodeCamp/test/1270.test.js | 11 + .freeCodeCamp/test/1280.test.js | 10 + .freeCodeCamp/test/1290.test.js | 10 + .freeCodeCamp/test/1300.test.js | 10 + .freeCodeCamp/test/1310.test.js | 10 + .freeCodeCamp/test/1320.test.js | 10 + .freeCodeCamp/test/1330.test.js | 10 + .freeCodeCamp/test/1340.test.js | 10 + .freeCodeCamp/test/1350.test.js | 11 + .freeCodeCamp/test/1360.test.js | 10 + .freeCodeCamp/test/1370.test.js | 10 + .freeCodeCamp/test/1380.test.js | 10 + .freeCodeCamp/test/1385.test.js | 10 + .freeCodeCamp/test/1390.test.js | 11 + .freeCodeCamp/test/140.test.js | 10 + .freeCodeCamp/test/1400.test.js | 11 + .freeCodeCamp/test/1410.test.js | 11 + .freeCodeCamp/test/1412.test.js | 10 + .freeCodeCamp/test/1413.test.js | 11 + .freeCodeCamp/test/1416.test.js | 11 + .freeCodeCamp/test/1420.test.js | 11 + .freeCodeCamp/test/1425.test.js | 10 + .freeCodeCamp/test/1428.test.js | 11 + .freeCodeCamp/test/1430.test.js | 11 + .freeCodeCamp/test/1440.test.js | 10 + .freeCodeCamp/test/1450.test.js | 10 + .freeCodeCamp/test/1460.test.js | 10 + .freeCodeCamp/test/1470.test.js | 11 + .freeCodeCamp/test/1480.test.js | 11 + .freeCodeCamp/test/1490.test.js | 17 + .freeCodeCamp/test/150.test.js | 11 + .freeCodeCamp/test/1500.test.js | 10 + .freeCodeCamp/test/1510.test.js | 11 + .freeCodeCamp/test/1520.test.js | 10 + .freeCodeCamp/test/1530.test.js | 10 + .freeCodeCamp/test/1540.test.js | 10 + .freeCodeCamp/test/1550.test.js | 10 + .freeCodeCamp/test/1560.test.js | 10 + .freeCodeCamp/test/1570.test.js | 10 + .freeCodeCamp/test/1580.test.js | 10 + .freeCodeCamp/test/1590.test.js | 10 + .freeCodeCamp/test/160.test.js | 11 + .freeCodeCamp/test/1600.test.js | 10 + .freeCodeCamp/test/1610.test.js | 10 + .freeCodeCamp/test/170.test.js | 10 + .freeCodeCamp/test/180.test.js | 11 + .freeCodeCamp/test/190.test.js | 11 + .freeCodeCamp/test/20.test.js | 11 + .freeCodeCamp/test/200.test.js | 11 + .freeCodeCamp/test/210.test.js | 11 + .freeCodeCamp/test/220.test.js | 11 + .freeCodeCamp/test/230.test.js | 10 + .freeCodeCamp/test/240.test.js | 11 + .freeCodeCamp/test/250.test.js | 11 + .freeCodeCamp/test/260.test.js | 11 + .freeCodeCamp/test/270.test.js | 11 + .freeCodeCamp/test/280.test.js | 10 + .freeCodeCamp/test/290.test.js | 11 + .freeCodeCamp/test/30.test.js | 10 + .freeCodeCamp/test/300.test.js | 10 + .freeCodeCamp/test/310.test.js | 10 + .freeCodeCamp/test/320.test.js | 10 + .freeCodeCamp/test/323.test.js | 11 + .freeCodeCamp/test/326.test.js | 10 + .freeCodeCamp/test/330.test.js | 11 + .freeCodeCamp/test/340.test.js | 10 + .freeCodeCamp/test/345.test.js | 11 + .freeCodeCamp/test/35.test.js | 11 + .freeCodeCamp/test/350.test.js | 11 + .freeCodeCamp/test/360.test.js | 11 + .freeCodeCamp/test/363.test.js | 11 + .freeCodeCamp/test/366.test.js | 10 + .freeCodeCamp/test/370.test.js | 11 + .freeCodeCamp/test/380.test.js | 11 + .freeCodeCamp/test/390.test.js | 10 + .freeCodeCamp/test/40.test.js | 11 + .freeCodeCamp/test/400.test.js | 10 + .freeCodeCamp/test/410.test.js | 10 + .freeCodeCamp/test/420.test.js | 10 + .freeCodeCamp/test/425.test.js | 11 + .freeCodeCamp/test/430.test.js | 11 + .freeCodeCamp/test/440.test.js | 10 + .freeCodeCamp/test/450.test.js | 11 + .freeCodeCamp/test/460.test.js | 10 + .freeCodeCamp/test/470.test.js | 10 + .freeCodeCamp/test/480.test.js | 10 + .freeCodeCamp/test/490.test.js | 12 + .freeCodeCamp/test/50.test.js | 10 + .freeCodeCamp/test/500.test.js | 11 + .freeCodeCamp/test/505.test.js | 11 + .freeCodeCamp/test/510.test.js | 11 + .freeCodeCamp/test/520.test.js | 11 + .freeCodeCamp/test/530.test.js | 11 + .freeCodeCamp/test/540.test.js | 11 + .freeCodeCamp/test/542.test.js | 11 + .freeCodeCamp/test/544.test.js | 10 + .freeCodeCamp/test/546.test.js | 10 + .freeCodeCamp/test/548.test.js | 10 + .freeCodeCamp/test/550.test.js | 11 + .freeCodeCamp/test/552.test.js | 11 + .freeCodeCamp/test/554.test.js | 10 + .freeCodeCamp/test/556.test.js | 13 + .freeCodeCamp/test/558.test.js | 10 + .freeCodeCamp/test/560.test.js | 13 + .freeCodeCamp/test/562.test.js | 10 + .freeCodeCamp/test/564.test.js | 10 + .freeCodeCamp/test/566.test.js | 10 + .freeCodeCamp/test/568.test.js | 10 + .freeCodeCamp/test/570.test.js | 10 + .freeCodeCamp/test/572.test.js | 10 + .freeCodeCamp/test/574.test.js | 10 + .freeCodeCamp/test/575.test.js | 10 + .freeCodeCamp/test/576.test.js | 10 + .freeCodeCamp/test/582.test.js | 10 + .freeCodeCamp/test/584.test.js | 10 + .freeCodeCamp/test/586.test.js | 10 + .freeCodeCamp/test/588.test.js | 11 + .freeCodeCamp/test/590.test.js | 11 + .freeCodeCamp/test/60.test.js | 10 + .freeCodeCamp/test/600.test.js | 11 + .freeCodeCamp/test/610.test.js | 12 + .freeCodeCamp/test/615.test.js | 10 + .freeCodeCamp/test/620.test.js | 10 + .freeCodeCamp/test/630.test.js | 11 + .freeCodeCamp/test/640.test.js | 10 + .freeCodeCamp/test/650.test.js | 10 + .freeCodeCamp/test/660.test.js | 10 + .freeCodeCamp/test/670.test.js | 10 + .freeCodeCamp/test/675.test.js | 10 + .freeCodeCamp/test/680.test.js | 10 + .freeCodeCamp/test/690.test.js | 11 + .freeCodeCamp/test/692.test.js | 10 + .freeCodeCamp/test/694.test.js | 11 + .freeCodeCamp/test/696.test.js | 10 + .freeCodeCamp/test/698.test.js | 11 + .freeCodeCamp/test/70.test.js | 11 + .freeCodeCamp/test/700.test.js | 11 + .freeCodeCamp/test/710.test.js | 10 + .freeCodeCamp/test/730.test.js | 11 + .freeCodeCamp/test/740.test.js | 10 + .freeCodeCamp/test/750.test.js | 10 + .freeCodeCamp/test/760.test.js | 10 + .freeCodeCamp/test/770.test.js | 11 + .freeCodeCamp/test/780.test.js | 11 + .freeCodeCamp/test/790.test.js | 10 + .freeCodeCamp/test/80.test.js | 11 + .freeCodeCamp/test/800.test.js | 10 + .freeCodeCamp/test/810.test.js | 10 + .freeCodeCamp/test/815.test.js | 10 + .freeCodeCamp/test/817.test.js | 9 + .freeCodeCamp/test/818.test.js | 8 + .freeCodeCamp/test/819.test.js | 11 + .freeCodeCamp/test/820.test.js | 10 + .freeCodeCamp/test/822.test.js | 10 + .freeCodeCamp/test/824.test.js | 10 + .freeCodeCamp/test/826.test.js | 10 + .freeCodeCamp/test/828.test.js | 10 + .freeCodeCamp/test/830.test.js | 11 + .freeCodeCamp/test/835.test.js | 10 + .freeCodeCamp/test/840.test.js | 11 + .freeCodeCamp/test/881.test.js | 10 + .freeCodeCamp/test/884.test.js | 10 + .freeCodeCamp/test/887.test.js | 10 + .freeCodeCamp/test/890.test.js | 10 + .freeCodeCamp/test/891.test.js | 10 + .freeCodeCamp/test/893.test.js | 10 + .freeCodeCamp/test/896.test.js | 10 + .freeCodeCamp/test/897.test.js | 10 + .freeCodeCamp/test/899.test.js | 10 + .freeCodeCamp/test/90.test.js | 10 + .freeCodeCamp/test/902.test.js | 10 + .freeCodeCamp/test/905.test.js | 10 + .freeCodeCamp/test/908.test.js | 10 + .freeCodeCamp/test/911.test.js | 10 + .freeCodeCamp/test/912.test.js | 10 + .freeCodeCamp/test/913.test.js | 10 + .freeCodeCamp/test/914.test.js | 10 + .freeCodeCamp/test/916.test.js | 10 + .freeCodeCamp/test/918.test.js | 10 + .freeCodeCamp/test/920.test.js | 10 + .freeCodeCamp/test/928.test.js | 11 + .freeCodeCamp/test/930.test.js | 12 + .freeCodeCamp/test/940.test.js | 11 + .freeCodeCamp/test/945.test.js | 10 + .freeCodeCamp/test/950.test.js | 12 + .freeCodeCamp/test/960.test.js | 12 + .freeCodeCamp/test/970.test.js | 12 + .freeCodeCamp/test/980.test.js | 12 + .freeCodeCamp/test/990.test.js | 12 + .freeCodeCamp/test/utils.js | 170 +++++++ 225 files changed, 3319 insertions(+) create mode 100644 .freeCodeCamp/.mocharc.json create mode 100644 .freeCodeCamp/package-lock.json create mode 100644 .freeCodeCamp/package.json create mode 100755 .freeCodeCamp/reset.sh create mode 100755 .freeCodeCamp/setup.sh create mode 100644 .freeCodeCamp/test/10.test.js create mode 100644 .freeCodeCamp/test/100.test.js create mode 100644 .freeCodeCamp/test/1000.test.js create mode 100644 .freeCodeCamp/test/1010.test.js create mode 100644 .freeCodeCamp/test/1020.test.js create mode 100644 .freeCodeCamp/test/1030.test.js create mode 100644 .freeCodeCamp/test/1040.test.js create mode 100644 .freeCodeCamp/test/1050.test.js create mode 100644 .freeCodeCamp/test/1060.test.js create mode 100644 .freeCodeCamp/test/1070.test.js create mode 100644 .freeCodeCamp/test/1080.test.js create mode 100644 .freeCodeCamp/test/1090.test.js create mode 100644 .freeCodeCamp/test/110.test.js create mode 100644 .freeCodeCamp/test/1100.test.js create mode 100644 .freeCodeCamp/test/1110.test.js create mode 100644 .freeCodeCamp/test/1120.test.js create mode 100644 .freeCodeCamp/test/1130.test.js create mode 100644 .freeCodeCamp/test/1140.test.js create mode 100644 .freeCodeCamp/test/1150.test.js create mode 100644 .freeCodeCamp/test/1160.test.js create mode 100644 .freeCodeCamp/test/1170.test.js create mode 100644 .freeCodeCamp/test/1180.test.js create mode 100644 .freeCodeCamp/test/1190.test.js create mode 100644 .freeCodeCamp/test/1200.test.js create mode 100644 .freeCodeCamp/test/1210.test.js create mode 100644 .freeCodeCamp/test/1220.test.js create mode 100644 .freeCodeCamp/test/1230.test.js create mode 100644 .freeCodeCamp/test/1240.test.js create mode 100644 .freeCodeCamp/test/1250.test.js create mode 100644 .freeCodeCamp/test/1260.test.js create mode 100644 .freeCodeCamp/test/1270.test.js create mode 100644 .freeCodeCamp/test/1280.test.js create mode 100644 .freeCodeCamp/test/1290.test.js create mode 100644 .freeCodeCamp/test/1300.test.js create mode 100644 .freeCodeCamp/test/1310.test.js create mode 100644 .freeCodeCamp/test/1320.test.js create mode 100644 .freeCodeCamp/test/1330.test.js create mode 100644 .freeCodeCamp/test/1340.test.js create mode 100644 .freeCodeCamp/test/1350.test.js create mode 100644 .freeCodeCamp/test/1360.test.js create mode 100644 .freeCodeCamp/test/1370.test.js create mode 100644 .freeCodeCamp/test/1380.test.js create mode 100644 .freeCodeCamp/test/1385.test.js create mode 100644 .freeCodeCamp/test/1390.test.js create mode 100644 .freeCodeCamp/test/140.test.js create mode 100644 .freeCodeCamp/test/1400.test.js create mode 100644 .freeCodeCamp/test/1410.test.js create mode 100644 .freeCodeCamp/test/1412.test.js create mode 100644 .freeCodeCamp/test/1413.test.js create mode 100644 .freeCodeCamp/test/1416.test.js create mode 100644 .freeCodeCamp/test/1420.test.js create mode 100644 .freeCodeCamp/test/1425.test.js create mode 100644 .freeCodeCamp/test/1428.test.js create mode 100644 .freeCodeCamp/test/1430.test.js create mode 100644 .freeCodeCamp/test/1440.test.js create mode 100644 .freeCodeCamp/test/1450.test.js create mode 100644 .freeCodeCamp/test/1460.test.js create mode 100644 .freeCodeCamp/test/1470.test.js create mode 100644 .freeCodeCamp/test/1480.test.js create mode 100644 .freeCodeCamp/test/1490.test.js create mode 100644 .freeCodeCamp/test/150.test.js create mode 100644 .freeCodeCamp/test/1500.test.js create mode 100644 .freeCodeCamp/test/1510.test.js create mode 100644 .freeCodeCamp/test/1520.test.js create mode 100644 .freeCodeCamp/test/1530.test.js create mode 100644 .freeCodeCamp/test/1540.test.js create mode 100644 .freeCodeCamp/test/1550.test.js create mode 100644 .freeCodeCamp/test/1560.test.js create mode 100644 .freeCodeCamp/test/1570.test.js create mode 100644 .freeCodeCamp/test/1580.test.js create mode 100644 .freeCodeCamp/test/1590.test.js create mode 100644 .freeCodeCamp/test/160.test.js create mode 100644 .freeCodeCamp/test/1600.test.js create mode 100644 .freeCodeCamp/test/1610.test.js create mode 100644 .freeCodeCamp/test/170.test.js create mode 100644 .freeCodeCamp/test/180.test.js create mode 100644 .freeCodeCamp/test/190.test.js create mode 100644 .freeCodeCamp/test/20.test.js create mode 100644 .freeCodeCamp/test/200.test.js create mode 100644 .freeCodeCamp/test/210.test.js create mode 100644 .freeCodeCamp/test/220.test.js create mode 100644 .freeCodeCamp/test/230.test.js create mode 100644 .freeCodeCamp/test/240.test.js create mode 100644 .freeCodeCamp/test/250.test.js create mode 100644 .freeCodeCamp/test/260.test.js create mode 100644 .freeCodeCamp/test/270.test.js create mode 100644 .freeCodeCamp/test/280.test.js create mode 100644 .freeCodeCamp/test/290.test.js create mode 100644 .freeCodeCamp/test/30.test.js create mode 100644 .freeCodeCamp/test/300.test.js create mode 100644 .freeCodeCamp/test/310.test.js create mode 100644 .freeCodeCamp/test/320.test.js create mode 100644 .freeCodeCamp/test/323.test.js create mode 100644 .freeCodeCamp/test/326.test.js create mode 100644 .freeCodeCamp/test/330.test.js create mode 100644 .freeCodeCamp/test/340.test.js create mode 100644 .freeCodeCamp/test/345.test.js create mode 100644 .freeCodeCamp/test/35.test.js create mode 100644 .freeCodeCamp/test/350.test.js create mode 100644 .freeCodeCamp/test/360.test.js create mode 100644 .freeCodeCamp/test/363.test.js create mode 100644 .freeCodeCamp/test/366.test.js create mode 100644 .freeCodeCamp/test/370.test.js create mode 100644 .freeCodeCamp/test/380.test.js create mode 100644 .freeCodeCamp/test/390.test.js create mode 100644 .freeCodeCamp/test/40.test.js create mode 100644 .freeCodeCamp/test/400.test.js create mode 100644 .freeCodeCamp/test/410.test.js create mode 100644 .freeCodeCamp/test/420.test.js create mode 100644 .freeCodeCamp/test/425.test.js create mode 100644 .freeCodeCamp/test/430.test.js create mode 100644 .freeCodeCamp/test/440.test.js create mode 100644 .freeCodeCamp/test/450.test.js create mode 100644 .freeCodeCamp/test/460.test.js create mode 100644 .freeCodeCamp/test/470.test.js create mode 100644 .freeCodeCamp/test/480.test.js create mode 100644 .freeCodeCamp/test/490.test.js create mode 100644 .freeCodeCamp/test/50.test.js create mode 100644 .freeCodeCamp/test/500.test.js create mode 100644 .freeCodeCamp/test/505.test.js create mode 100644 .freeCodeCamp/test/510.test.js create mode 100644 .freeCodeCamp/test/520.test.js create mode 100644 .freeCodeCamp/test/530.test.js create mode 100644 .freeCodeCamp/test/540.test.js create mode 100644 .freeCodeCamp/test/542.test.js create mode 100644 .freeCodeCamp/test/544.test.js create mode 100644 .freeCodeCamp/test/546.test.js create mode 100644 .freeCodeCamp/test/548.test.js create mode 100644 .freeCodeCamp/test/550.test.js create mode 100644 .freeCodeCamp/test/552.test.js create mode 100644 .freeCodeCamp/test/554.test.js create mode 100644 .freeCodeCamp/test/556.test.js create mode 100644 .freeCodeCamp/test/558.test.js create mode 100644 .freeCodeCamp/test/560.test.js create mode 100644 .freeCodeCamp/test/562.test.js create mode 100644 .freeCodeCamp/test/564.test.js create mode 100644 .freeCodeCamp/test/566.test.js create mode 100644 .freeCodeCamp/test/568.test.js create mode 100644 .freeCodeCamp/test/570.test.js create mode 100644 .freeCodeCamp/test/572.test.js create mode 100644 .freeCodeCamp/test/574.test.js create mode 100644 .freeCodeCamp/test/575.test.js create mode 100644 .freeCodeCamp/test/576.test.js create mode 100644 .freeCodeCamp/test/582.test.js create mode 100644 .freeCodeCamp/test/584.test.js create mode 100644 .freeCodeCamp/test/586.test.js create mode 100644 .freeCodeCamp/test/588.test.js create mode 100644 .freeCodeCamp/test/590.test.js create mode 100644 .freeCodeCamp/test/60.test.js create mode 100644 .freeCodeCamp/test/600.test.js create mode 100644 .freeCodeCamp/test/610.test.js create mode 100644 .freeCodeCamp/test/615.test.js create mode 100644 .freeCodeCamp/test/620.test.js create mode 100644 .freeCodeCamp/test/630.test.js create mode 100644 .freeCodeCamp/test/640.test.js create mode 100644 .freeCodeCamp/test/650.test.js create mode 100644 .freeCodeCamp/test/660.test.js create mode 100644 .freeCodeCamp/test/670.test.js create mode 100644 .freeCodeCamp/test/675.test.js create mode 100644 .freeCodeCamp/test/680.test.js create mode 100644 .freeCodeCamp/test/690.test.js create mode 100644 .freeCodeCamp/test/692.test.js create mode 100644 .freeCodeCamp/test/694.test.js create mode 100644 .freeCodeCamp/test/696.test.js create mode 100644 .freeCodeCamp/test/698.test.js create mode 100644 .freeCodeCamp/test/70.test.js create mode 100644 .freeCodeCamp/test/700.test.js create mode 100644 .freeCodeCamp/test/710.test.js create mode 100644 .freeCodeCamp/test/730.test.js create mode 100644 .freeCodeCamp/test/740.test.js create mode 100644 .freeCodeCamp/test/750.test.js create mode 100644 .freeCodeCamp/test/760.test.js create mode 100644 .freeCodeCamp/test/770.test.js create mode 100644 .freeCodeCamp/test/780.test.js create mode 100644 .freeCodeCamp/test/790.test.js create mode 100644 .freeCodeCamp/test/80.test.js create mode 100644 .freeCodeCamp/test/800.test.js create mode 100644 .freeCodeCamp/test/810.test.js create mode 100644 .freeCodeCamp/test/815.test.js create mode 100644 .freeCodeCamp/test/817.test.js create mode 100644 .freeCodeCamp/test/818.test.js create mode 100644 .freeCodeCamp/test/819.test.js create mode 100644 .freeCodeCamp/test/820.test.js create mode 100644 .freeCodeCamp/test/822.test.js create mode 100644 .freeCodeCamp/test/824.test.js create mode 100644 .freeCodeCamp/test/826.test.js create mode 100644 .freeCodeCamp/test/828.test.js create mode 100644 .freeCodeCamp/test/830.test.js create mode 100644 .freeCodeCamp/test/835.test.js create mode 100644 .freeCodeCamp/test/840.test.js create mode 100644 .freeCodeCamp/test/881.test.js create mode 100644 .freeCodeCamp/test/884.test.js create mode 100644 .freeCodeCamp/test/887.test.js create mode 100644 .freeCodeCamp/test/890.test.js create mode 100644 .freeCodeCamp/test/891.test.js create mode 100644 .freeCodeCamp/test/893.test.js create mode 100644 .freeCodeCamp/test/896.test.js create mode 100644 .freeCodeCamp/test/897.test.js create mode 100644 .freeCodeCamp/test/899.test.js create mode 100644 .freeCodeCamp/test/90.test.js create mode 100644 .freeCodeCamp/test/902.test.js create mode 100644 .freeCodeCamp/test/905.test.js create mode 100644 .freeCodeCamp/test/908.test.js create mode 100644 .freeCodeCamp/test/911.test.js create mode 100644 .freeCodeCamp/test/912.test.js create mode 100644 .freeCodeCamp/test/913.test.js create mode 100644 .freeCodeCamp/test/914.test.js create mode 100644 .freeCodeCamp/test/916.test.js create mode 100644 .freeCodeCamp/test/918.test.js create mode 100644 .freeCodeCamp/test/920.test.js create mode 100644 .freeCodeCamp/test/928.test.js create mode 100644 .freeCodeCamp/test/930.test.js create mode 100644 .freeCodeCamp/test/940.test.js create mode 100644 .freeCodeCamp/test/945.test.js create mode 100644 .freeCodeCamp/test/950.test.js create mode 100644 .freeCodeCamp/test/960.test.js create mode 100644 .freeCodeCamp/test/970.test.js create mode 100644 .freeCodeCamp/test/980.test.js create mode 100644 .freeCodeCamp/test/990.test.js create mode 100644 .freeCodeCamp/test/utils.js diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json new file mode 100644 index 0000000000..717711d3dc --- /dev/null +++ b/.freeCodeCamp/.mocharc.json @@ -0,0 +1,8 @@ +{ + "spec": ["./test/*.js"], + "reporter": "mocha-tap-reporter", + "fail-zero": false, + "timeout": "5000", + "exit": "true", + "grep": "/passAllTests/" +} \ No newline at end of file diff --git a/.freeCodeCamp/package-lock.json b/.freeCodeCamp/package-lock.json new file mode 100644 index 0000000000..ca841582a2 --- /dev/null +++ b/.freeCodeCamp/package-lock.json @@ -0,0 +1,822 @@ +{ + "name": "freecodecamp", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==" + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "requires": { + "is-buffer": "~2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==" + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "requires": { + "chalk": "^2.4.2" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "mocha-tap-reporter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/mocha-tap-reporter/-/mocha-tap-reporter-0.1.3.tgz", + "integrity": "sha1-Emy70vggZJXnKxWZFNOXuOoXoig=", + "requires": { + "mocha": "*" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + }, + "promisify-child-process": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/promisify-child-process/-/promisify-child-process-4.1.1.tgz", + "integrity": "sha512-/sRjHZwoXf1rJ+8s4oWjYjGRVKNK1DUnqfRC1Zek18pl0cN6k3yJ1cCbqd0tWNe4h0Gr+SY4vR42N33+T82WkA==" + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "requires": { + "picomatch": "^2.0.4" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } + } + } +} diff --git a/.freeCodeCamp/package.json b/.freeCodeCamp/package.json new file mode 100644 index 0000000000..a224a83293 --- /dev/null +++ b/.freeCodeCamp/package.json @@ -0,0 +1,18 @@ +{ + "name": "freecodecamp", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "programmatic-test": "mocha --config .mocharc.json", + "test": "mocha --config .mocharc.json" + }, + "author": "", + "license": "ISC", + "dependencies": { + "mocha": "^7.2.0", + "mocha-tap-reporter": "^0.1.3", + "promisify-child-process": "^4.1.1", + "shell-quote": "^1.7.2" + } +} diff --git a/.freeCodeCamp/reset.sh b/.freeCodeCamp/reset.sh new file mode 100755 index 0000000000..e69de29bb2 diff --git a/.freeCodeCamp/setup.sh b/.freeCodeCamp/setup.sh new file mode 100755 index 0000000000..6c53d39a78 --- /dev/null +++ b/.freeCodeCamp/setup.sh @@ -0,0 +1,3 @@ +sudo cp /workspace/project/.freeCodeCamp/.bashrc ~/.bashrc +sudo touch /workspace/.bash_history +sudo chmod 777 /workspace/.bash_history diff --git a/.freeCodeCamp/test/10.test.js b/.freeCodeCamp/test/10.test.js new file mode 100644 index 0000000000..80eafd6076 --- /dev/null +++ b/.freeCodeCamp/test/10.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should echo the correct text in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'echo' && lastCommand[1] === 'hello' && lastCommand[2] === 'bash' && (lastCommand[3] === undefined || lastCommand[3].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/100.test.js b/.freeCodeCamp/test/100.test.js new file mode 100644 index 0000000000..714f1137df --- /dev/null +++ b/.freeCodeCamp/test/100.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should "list" the folder contents with the correct flag', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'ls' && lastCommand[1] === '-l' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1000.test.js b/.freeCodeCamp/test/1000.test.js new file mode 100644 index 0000000000..6900e8e496 --- /dev/null +++ b/.freeCodeCamp/test/1000.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + const secondLastCommand = await getLastCommand(1); + + assert(lastCommand[0] === './bingo.sh' && secondLastCommand[0] === './bingo.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1010.test.js b/.freeCodeCamp/test/1010.test.js new file mode 100644 index 0000000000..4fb63cbfe6 --- /dev/null +++ b/.freeCodeCamp/test/1010.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getDirectoryContents } = require('./utils'); + +describe('You', () => { + it('should use the "touch" command to create the correct file', async () => { + const directoryContents = await getDirectoryContents(`..`); + const lastCommand = await getLastCommand(); + + assert(directoryContents.includes('fortune.sh') && lastCommand[0] === 'touch' && /fortune.sh/g.test(lastCommand[1])); + }); +}); diff --git a/.freeCodeCamp/test/1020.test.js b/.freeCodeCamp/test/1020.test.js new file mode 100644 index 0000000000..f138d1e44d --- /dev/null +++ b/.freeCodeCamp/test/1020.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { canExecute } = require('./utils'); + +describe('Your script file', () => { + it('should have executable permissions', async () => { + const fileIsExecutable = await canExecute('../fortune.sh'); + + assert(fileIsExecutable); + }); +}); diff --git a/.freeCodeCamp/test/1030.test.js b/.freeCodeCamp/test/1030.test.js new file mode 100644 index 0000000000..b5b161f0c3 --- /dev/null +++ b/.freeCodeCamp/test/1030.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct "shebang"', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + + assert(/^\s*#![ \t]*\/bin\/bash\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1040.test.js b/.freeCodeCamp/test/1040.test.js new file mode 100644 index 0000000000..a83b86d4f7 --- /dev/null +++ b/.freeCodeCamp/test/1040.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct comment', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + + assert(/^#[ \t]*Program to tell a persons fortune[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1050.test.js b/.freeCodeCamp/test/1050.test.js new file mode 100644 index 0000000000..fdf4eb76a7 --- /dev/null +++ b/.freeCodeCamp/test/1050.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const output = await getCommandOutput('./fortune.sh'); + + assert(/^\n~~ Fortune Teller ~~\n{2}/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1060.test.js b/.freeCodeCamp/test/1060.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1060.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1070.test.js b/.freeCodeCamp/test/1070.test.js new file mode 100644 index 0000000000..496845e315 --- /dev/null +++ b/.freeCodeCamp/test/1070.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCommandOutput } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + const output = await getCommandOutput(`${lastCommand}\ndeclare -p ARR`) + + assert(output === 'declare -a ARR=([0]="a" [1]="b" [2]="c")\n'); + }); +}); diff --git a/.freeCodeCamp/test/1080.test.js b/.freeCodeCamp/test/1080.test.js new file mode 100644 index 0000000000..4576e473a5 --- /dev/null +++ b/.freeCodeCamp/test/1080.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+\${ARR\[1\]}\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1090.test.js b/.freeCodeCamp/test/1090.test.js new file mode 100644 index 0000000000..d1049c6b3c --- /dev/null +++ b/.freeCodeCamp/test/1090.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+\${ARR\[(@|\*)\]}\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/110.test.js b/.freeCodeCamp/test/110.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/110.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1100.test.js b/.freeCodeCamp/test/1100.test.js new file mode 100644 index 0000000000..3b5a306e37 --- /dev/null +++ b/.freeCodeCamp/test/1100.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'declare' && lastCommand[1] === '-p' && lastCommand[2] === 'ARR'); + }); +}); diff --git a/.freeCodeCamp/test/1110.test.js b/.freeCodeCamp/test/1110.test.js new file mode 100644 index 0000000000..b29443f278 --- /dev/null +++ b/.freeCodeCamp/test/1110.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the correct array variable added', async () => { + const output = await appendAndRun('../fortune.sh', 'declare -p RESPONSES'); + + assert(/^\s*declare -a RESPONSES=\(\[0\]="Yes" \[1\]="No" \[2\]="Maybe" \[3\]="Outlook good" \[4\]="Don't count on it" \[5\]="Ask again later"\)\s*$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1120.test.js b/.freeCodeCamp/test/1120.test.js new file mode 100644 index 0000000000..3ee3c460f4 --- /dev/null +++ b/.freeCodeCamp/test/1120.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getCommandOutput('./fortune.sh'); + + assert(/^\s*echo[ \t]+\${RESPONSES\[5\]}[ \t]*;?\s*$/gm.test(scriptFile) && /^\s*Ask again later$/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/1130.test.js b/.freeCodeCamp/test/1130.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1130.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1140.test.js b/.freeCodeCamp/test/1140.test.js new file mode 100644 index 0000000000..8710e8d4b2 --- /dev/null +++ b/.freeCodeCamp/test/1140.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the correct variable added', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await appendAndRun('../fortune.sh', 'echo $N'); + + assert(/^\s*N=('|"|)\$\(\([ \t]*\$?RANDOM[ \t]*%[ \t]*6[ \t]*\)\)\1[ \t]*;?\s*$/gm.test(scriptFile) && /^\d{1}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1150.test.js b/.freeCodeCamp/test/1150.test.js new file mode 100644 index 0000000000..230c312b71 --- /dev/null +++ b/.freeCodeCamp/test/1150.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getFileContents, replaceAndRun } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const re = /%[ \t]*6/gm; + const output = await replaceAndRun('../fortune.sh', re, '%1'); + + assert(/^\s*echo[ \t]+\${RESPONSES\[\$N\]}[ \t]*;?\s*$/gm.test(scriptFile) && /^Yes\s*$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1160.test.js b/.freeCodeCamp/test/1160.test.js new file mode 100644 index 0000000000..c04648cc46 --- /dev/null +++ b/.freeCodeCamp/test/1160.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1170.test.js b/.freeCodeCamp/test/1170.test.js new file mode 100644 index 0000000000..81a8982b56 --- /dev/null +++ b/.freeCodeCamp/test/1170.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand, getCommandOutput } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'function'); + }); +}); diff --git a/.freeCodeCamp/test/1180.test.js b/.freeCodeCamp/test/1180.test.js new file mode 100644 index 0000000000..1907287a64 --- /dev/null +++ b/.freeCodeCamp/test/1180.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested function added correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + + assert(/^\s*(function[ \t]+)?GET_FORTUNE[ \t]*\([ \t]*\)\s*{\s*}[ \t]*;?$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1190.test.js b/.freeCodeCamp/test/1190.test.js new file mode 100644 index 0000000000..239d4c407d --- /dev/null +++ b/.freeCodeCamp/test/1190.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const output = await appendAndRun('../fortune.sh', 'GET_FORTUNE'); + + assert(/Ask a yes or no question:/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1200.test.js b/.freeCodeCamp/test/1200.test.js new file mode 100644 index 0000000000..bf45c993db --- /dev/null +++ b/.freeCodeCamp/test/1200.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getCommandOutput, getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should call the suggested fuction correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getCommandOutput('./fortune.sh'); + + assert(scriptFile.match(/GET_FORTUNE/g).length > 1 && /Ask a yes or no question:/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1210.test.js b/.freeCodeCamp/test/1210.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1210.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1220.test.js b/.freeCodeCamp/test/1220.test.js new file mode 100644 index 0000000000..5e3b9143a0 --- /dev/null +++ b/.freeCodeCamp/test/1220.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should "read" input into the suggested variable correctly', async () => { + const output = await appendAndRun('../fortune.sh', 'echo $QUESTION', { input: ['test?'] }); + + assert(/test?/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1230.test.js b/.freeCodeCamp/test/1230.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1230.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1240.test.js b/.freeCodeCamp/test/1240.test.js new file mode 100644 index 0000000000..c04648cc46 --- /dev/null +++ b/.freeCodeCamp/test/1240.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1250.test.js b/.freeCodeCamp/test/1250.test.js new file mode 100644 index 0000000000..676e6ca97c --- /dev/null +++ b/.freeCodeCamp/test/1250.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand, getCommandOutput } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'until'); + }); +}); diff --git a/.freeCodeCamp/test/1260.test.js b/.freeCodeCamp/test/1260.test.js new file mode 100644 index 0000000000..7bdf294452 --- /dev/null +++ b/.freeCodeCamp/test/1260.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "until" loop added correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getScriptOutput('./fortune.sh', ['t', 'test?']); + + assert(/^\s*until[ \t]+\[\[[ \t]+\$QUESTION[ \t]+==?[ \t]+('|"|)test\?\1[ \t]+\]\]/gm.test(scriptFile) && output.match(/Ask a yes or no question:/gm).length === 2); + }); +}); diff --git a/.freeCodeCamp/test/1270.test.js b/.freeCodeCamp/test/1270.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1270.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1280.test.js b/.freeCodeCamp/test/1280.test.js new file mode 100644 index 0000000000..3882abaf3a --- /dev/null +++ b/.freeCodeCamp/test/1280.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === '[['); + }); +}); diff --git a/.freeCodeCamp/test/1290.test.js b/.freeCodeCamp/test/1290.test.js new file mode 100644 index 0000000000..bd9c333e0d --- /dev/null +++ b/.freeCodeCamp/test/1290.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+('|"|)hello\1[ \t]+==[ \t]+('|"|)hello\2[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/gm.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1300.test.js b/.freeCodeCamp/test/1300.test.js new file mode 100644 index 0000000000..3573c284e7 --- /dev/null +++ b/.freeCodeCamp/test/1300.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+('|"|)hello\1[ \t]+==[ \t]+('|"|)world\2[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/gm.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1310.test.js b/.freeCodeCamp/test/1310.test.js new file mode 100644 index 0000000000..eead15755f --- /dev/null +++ b/.freeCodeCamp/test/1310.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+('|"|)hello\1[ \t]+=~[ \t]+('|"|)el\2[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/gm.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1320.test.js b/.freeCodeCamp/test/1320.test.js new file mode 100644 index 0000000000..bd5a4a81b8 --- /dev/null +++ b/.freeCodeCamp/test/1320.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+('|")hello world\1[ \t]+=~[ \t]+('|")lo wor\2[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1330.test.js b/.freeCodeCamp/test/1330.test.js new file mode 100644 index 0000000000..64046454c5 --- /dev/null +++ b/.freeCodeCamp/test/1330.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+('|")hello world\1[ \t]+=~[ \t]+\^h[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1340.test.js b/.freeCodeCamp/test/1340.test.js new file mode 100644 index 0000000000..80c4fa3790 --- /dev/null +++ b/.freeCodeCamp/test/1340.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+('|")hello world\1[ \t]+=~[ \t]+\^h\.\+d\$[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1350.test.js b/.freeCodeCamp/test/1350.test.js new file mode 100644 index 0000000000..177d0a0aad --- /dev/null +++ b/.freeCodeCamp/test/1350.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCommandOutput } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + const output = await getCommandOutput(`${lastCommand}\ndeclare -p VAR`) + + assert(/declare -- VAR="hello world"\n$/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1360.test.js b/.freeCodeCamp/test/1360.test.js new file mode 100644 index 0000000000..23d5eaf8bd --- /dev/null +++ b/.freeCodeCamp/test/1360.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo[ \t]+('|"|)\$VAR\1[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1370.test.js b/.freeCodeCamp/test/1370.test.js new file mode 100644 index 0000000000..aeb9df5233 --- /dev/null +++ b/.freeCodeCamp/test/1370.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+("|)\$VAR\1[ \t]+==[ \t]+('|")hello world\2[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1380.test.js b/.freeCodeCamp/test/1380.test.js new file mode 100644 index 0000000000..af0d34f694 --- /dev/null +++ b/.freeCodeCamp/test/1380.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+("|)\$VAR\1[ \t]+=~[ \t]+\\\?\$[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1385.test.js b/.freeCodeCamp/test/1385.test.js new file mode 100644 index 0000000000..fac3c7c546 --- /dev/null +++ b/.freeCodeCamp/test/1385.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[[ \t]+("|)test\?\1[ \t]+=~[ \t]+\\\?\$[ \t]+\]\][ \t]*;[ \t]*echo[ \t]+\$\?[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/1390.test.js b/.freeCodeCamp/test/1390.test.js new file mode 100644 index 0000000000..ec72af3d97 --- /dev/null +++ b/.freeCodeCamp/test/1390.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the correct condition for your "until" loop', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getScriptOutput('./fortune.sh', ['t', 'test?']); + + assert(/^\s*until[ \t]+\[\[[ \t]+\$QUESTION[ \t]+=~[ \t]+\\\?\$[ \t]+\]\]/gm.test(scriptFile) && output.match(/Ask a yes or no question:/gm).length === 2); + }); +}); diff --git a/.freeCodeCamp/test/140.test.js b/.freeCodeCamp/test/140.test.js new file mode 100644 index 0000000000..30e834c0a5 --- /dev/null +++ b/.freeCodeCamp/test/140.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the "ls" command added correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + + assert(/^\s*ls[ \t]+-l[ \t]*;?\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1400.test.js b/.freeCodeCamp/test/1400.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1400.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1410.test.js b/.freeCodeCamp/test/1410.test.js new file mode 100644 index 0000000000..bbf5a500cd --- /dev/null +++ b/.freeCodeCamp/test/1410.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "if" statement added correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getScriptOutput('./fortune.sh', ['test?']); + + assert(/^\s*if[ \t]+\[\[[ \t]+![ \t]+\$1[ \t]+\]\]/gm.test(scriptFile) && /Ask a yes or no question:/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1412.test.js b/.freeCodeCamp/test/1412.test.js new file mode 100644 index 0000000000..243d8e9e62 --- /dev/null +++ b/.freeCodeCamp/test/1412.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getScriptOutput, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggests "if/else" statement added correctly', async () => { + const output = await appendAndRun('../fortune.sh', 'GET_FORTUNE again', { input: ['test?', 'test?']}); + + assert(/Try again\. Make sure it ends with a question mark:/g.test(output) && /Ask a yes or no question:/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/1413.test.js b/.freeCodeCamp/test/1413.test.js new file mode 100644 index 0000000000..4b7eee1c5d --- /dev/null +++ b/.freeCodeCamp/test/1413.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should call the suggested function correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getScriptOutput('./fortune.sh', ['test?']); + + assert(/Try again\. Make sure it ends with a question mark:/g.test(output) && /GET_FORTUNE[ \t]+again[ \t]*;?/g.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1416.test.js b/.freeCodeCamp/test/1416.test.js new file mode 100644 index 0000000000..6b8002f6c3 --- /dev/null +++ b/.freeCodeCamp/test/1416.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should call your function correctly', async () => { + const scriptFile = await getFileContents('../fortune.sh'); + const output = await getScriptOutput('./fortune.sh', ['test', 'test?']); + + assert(/Ask a yes or no question:\s*Try again\. Make sure it ends with a question mark:/g.test(output) && scriptFile.match(/GET_FORTUNE/gm).length > 2); + }); +}); diff --git a/.freeCodeCamp/test/1420.test.js b/.freeCodeCamp/test/1420.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1420.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1425.test.js b/.freeCodeCamp/test/1425.test.js new file mode 100644 index 0000000000..6f899d1737 --- /dev/null +++ b/.freeCodeCamp/test/1425.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggests "if" statement added correctly', async () => { + const output = await getScriptOutput('./fortune.sh', ['test?']); + + assert(/\n{2}(Yes|No|Maybe|Outlook good|Don't count on it|Ask again later)\n$/g.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/1428.test.js b/.freeCodeCamp/test/1428.test.js new file mode 100644 index 0000000000..96a8c4994d --- /dev/null +++ b/.freeCodeCamp/test/1428.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './fortune.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1430.test.js b/.freeCodeCamp/test/1430.test.js new file mode 100644 index 0000000000..ff23b5001d --- /dev/null +++ b/.freeCodeCamp/test/1430.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getDirectoryContents } = require('./utils'); + +describe('You', () => { + it('should use the "touch" command to create the correct file', async () => { + const directoryContents = await getDirectoryContents(`..`); + const lastCommand = await getLastCommand(); + + assert(directoryContents.includes('five.sh') && lastCommand[0] === 'touch' && /five.sh/g.test(lastCommand[1])); + }); +}); diff --git a/.freeCodeCamp/test/1440.test.js b/.freeCodeCamp/test/1440.test.js new file mode 100644 index 0000000000..2754f7527b --- /dev/null +++ b/.freeCodeCamp/test/1440.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { canExecute } = require('./utils'); + +describe('Your script file', () => { + it('should have executable permissions', async () => { + const fileIsExecutable = await canExecute('../five.sh'); + + assert(fileIsExecutable); + }); +}); diff --git a/.freeCodeCamp/test/1450.test.js b/.freeCodeCamp/test/1450.test.js new file mode 100644 index 0000000000..aee53b8922 --- /dev/null +++ b/.freeCodeCamp/test/1450.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct "shebang"', async () => { + const scriptFile = await getFileContents('../five.sh'); + + assert(/^\s*#![ \t]*\/bin\/bash\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1460.test.js b/.freeCodeCamp/test/1460.test.js new file mode 100644 index 0000000000..ba9e3541c2 --- /dev/null +++ b/.freeCodeCamp/test/1460.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested comment added correctly', async () => { + const scriptFile = await getFileContents('../five.sh'); + + assert(/^#[ \t]*Program to run my other four programs[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/1470.test.js b/.freeCodeCamp/test/1470.test.js new file mode 100644 index 0000000000..dc3d82e6d5 --- /dev/null +++ b/.freeCodeCamp/test/1470.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested command added correctly', async () => { + const scriptFile = await getFileContents('../five.sh'); + const output = await getScriptOutput('./five.sh', ['me', 'here', 'fCC']); + + assert(/^\s*\.\/questionnaire\.sh[ \t]*;?\s*$/gm.test(scriptFile) && /~~ Questionnaire ~~/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/1480.test.js b/.freeCodeCamp/test/1480.test.js new file mode 100644 index 0000000000..92b1feda8b --- /dev/null +++ b/.freeCodeCamp/test/1480.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './five.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1490.test.js b/.freeCodeCamp/test/1490.test.js new file mode 100644 index 0000000000..a5da52ade9 --- /dev/null +++ b/.freeCodeCamp/test/1490.test.js @@ -0,0 +1,17 @@ +const assert = require('assert'); +const { replaceAndRun, getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested commands added correctly', async () => { + const scriptFile = await getFileContents('../five.sh'); + const re = /\.\/countdown\.sh[ \t]+\d+/gm; + const output = await replaceAndRun('../five.sh', re, './countdown.sh a', { input: ['?', '?', '?', '?'] }); + + const test1 = /~~ Questionnaire ~~/.test(output); + const test2 = /~~ Countdown Timer ~~/.test(output); + const test3 = /~~ Bingo Number Generator ~~/.test(output); + const test4 = /~~ Fortune Teller ~~/.test(output); + + assert(test1 && test2 && test3 && test4 && /\.\/countdown\.sh[ \t]+3/g.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/150.test.js b/.freeCodeCamp/test/150.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/150.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1500.test.js b/.freeCodeCamp/test/1500.test.js new file mode 100644 index 0000000000..639f766fa8 --- /dev/null +++ b/.freeCodeCamp/test/1500.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'clear'); + }); +}); diff --git a/.freeCodeCamp/test/1510.test.js b/.freeCodeCamp/test/1510.test.js new file mode 100644 index 0000000000..92b1feda8b --- /dev/null +++ b/.freeCodeCamp/test/1510.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './five.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/1520.test.js b/.freeCodeCamp/test/1520.test.js new file mode 100644 index 0000000000..c04648cc46 --- /dev/null +++ b/.freeCodeCamp/test/1520.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1530.test.js b/.freeCodeCamp/test/1530.test.js new file mode 100644 index 0000000000..b6d6c502dd --- /dev/null +++ b/.freeCodeCamp/test/1530.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'type'); + }); +}); diff --git a/.freeCodeCamp/test/1540.test.js b/.freeCodeCamp/test/1540.test.js new file mode 100644 index 0000000000..9f9bfb8169 --- /dev/null +++ b/.freeCodeCamp/test/1540.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === 'echo' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1550.test.js b/.freeCodeCamp/test/1550.test.js new file mode 100644 index 0000000000..73a80eb167 --- /dev/null +++ b/.freeCodeCamp/test/1550.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === 'read' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1560.test.js b/.freeCodeCamp/test/1560.test.js new file mode 100644 index 0000000000..bc25f5af0a --- /dev/null +++ b/.freeCodeCamp/test/1560.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === 'if' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1570.test.js b/.freeCodeCamp/test/1570.test.js new file mode 100644 index 0000000000..167bc43640 --- /dev/null +++ b/.freeCodeCamp/test/1570.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === 'then' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1580.test.js b/.freeCodeCamp/test/1580.test.js new file mode 100644 index 0000000000..f22dc78fb1 --- /dev/null +++ b/.freeCodeCamp/test/1580.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === 'bash' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1590.test.js b/.freeCodeCamp/test/1590.test.js new file mode 100644 index 0000000000..24cf8e3f25 --- /dev/null +++ b/.freeCodeCamp/test/1590.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === 'psql' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/160.test.js b/.freeCodeCamp/test/160.test.js new file mode 100644 index 0000000000..4101e7a27c --- /dev/null +++ b/.freeCodeCamp/test/160.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, removeWhitespace } = require('./utils'); + +describe('Your script', () => { + it('should only have a "shebang"', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const noWhitespace = await removeWhitespace(scriptFile); + + assert(/^\s*#![ \t]*\/bin\/bash\s*$/gm.test(scriptFile) && /^#!\/bin\/bash$/gm.test(noWhitespace)); + }); +}); diff --git a/.freeCodeCamp/test/1600.test.js b/.freeCodeCamp/test/1600.test.js new file mode 100644 index 0000000000..8c56878245 --- /dev/null +++ b/.freeCodeCamp/test/1600.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'type' && lastCommand[1] === './five.sh' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/1610.test.js b/.freeCodeCamp/test/1610.test.js new file mode 100644 index 0000000000..4b9b488069 --- /dev/null +++ b/.freeCodeCamp/test/1610.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'exit'); + }); +}); diff --git a/.freeCodeCamp/test/170.test.js b/.freeCodeCamp/test/170.test.js new file mode 100644 index 0000000000..7bca546808 --- /dev/null +++ b/.freeCodeCamp/test/170.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested variable correctly', async () => { + const output = await appendAndRun('../questionnaire.sh', 'echo $QUESTION1'); + + assert(/^What's your name\?$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/180.test.js b/.freeCodeCamp/test/180.test.js new file mode 100644 index 0000000000..220378f3cd --- /dev/null +++ b/.freeCodeCamp/test/180.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested variable correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await getCommandOutput('./questionnaire.sh'); + + assert(/^\s*echo[ \t]+('|")?\$QUESTION1\1?[ \t]*;?\s*$/gm.test(scriptFile) && /^What's your name\?$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/190.test.js b/.freeCodeCamp/test/190.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/190.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/20.test.js b/.freeCodeCamp/test/20.test.js new file mode 100644 index 0000000000..45de02959b --- /dev/null +++ b/.freeCodeCamp/test/20.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getDirectoryContents } = require('./utils'); + +describe('You', () => { + it('should use the "touch" command to create the correct file', async () => { + const directoryContents = await getDirectoryContents(`..`); + const lastCommand = await getLastCommand(); + + assert(directoryContents.includes('questionnaire.sh') && lastCommand[0] === 'touch' && /questionnaire\.sh/g.test(lastCommand[1])); + }); +}); diff --git a/.freeCodeCamp/test/200.test.js b/.freeCodeCamp/test/200.test.js new file mode 100644 index 0000000000..ae09824bf5 --- /dev/null +++ b/.freeCodeCamp/test/200.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should use "read" to get input into the correct variable', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await appendAndRun('../questionnaire.sh', 'echo $NAME', options = { input: ['me'] }); + + assert(/^\s*read[ \t]+NAME[ \t]*;?\s*$/gm.test(scriptFile) && /^me$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/210.test.js b/.freeCodeCamp/test/210.test.js new file mode 100644 index 0000000000..a811e56378 --- /dev/null +++ b/.freeCodeCamp/test/210.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await getScriptOutput('./questionnaire.sh', ['me']); + + assert(/^\s*echo[ \t]+('|"|)Hello[ \t]+\$NAME\.\1[ \t]*;?\s*$/gm.test(scriptFile) && /^Hello me\.$/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/220.test.js b/.freeCodeCamp/test/220.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/220.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/230.test.js b/.freeCodeCamp/test/230.test.js new file mode 100644 index 0000000000..19e8fecbfb --- /dev/null +++ b/.freeCodeCamp/test/230.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable added correctly', async () => { + const output = await appendAndRun('../questionnaire.sh', 'echo $QUESTION2', options = { input: ['me'] }); + + assert(/^Where are you from\?$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/240.test.js b/.freeCodeCamp/test/240.test.js new file mode 100644 index 0000000000..a615b788a7 --- /dev/null +++ b/.freeCodeCamp/test/240.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested variable correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await getScriptOutput('./questionnaire.sh', ['me']); + + assert(/^\s*echo[ \t]+('|")?\$QUESTION2\1?[ \t]*;?\s*$/gm.test(scriptFile) && /^Where are you from\?$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/250.test.js b/.freeCodeCamp/test/250.test.js new file mode 100644 index 0000000000..4b34aba8bf --- /dev/null +++ b/.freeCodeCamp/test/250.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should use "read" to get input into the correct variable', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await appendAndRun('../questionnaire.sh', 'echo $LOCATION', options = { input: ['me', 'here'] }); + + assert(/^\s*read[ \t]+LOCATION[ \t]*;?\s*$/gm.test(scriptFile) && /^here$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/260.test.js b/.freeCodeCamp/test/260.test.js new file mode 100644 index 0000000000..4ea9cacf3f --- /dev/null +++ b/.freeCodeCamp/test/260.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here']); + + assert(/^\s*echo[ \t]+('|"|)Hello[ \t]+\$NAME from \$LOCATION\.\1[ \t]*;?\s*$/gm.test(scriptFile) && /^Hello me from here\.$/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/270.test.js b/.freeCodeCamp/test/270.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/270.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/280.test.js b/.freeCodeCamp/test/280.test.js new file mode 100644 index 0000000000..c020b92688 --- /dev/null +++ b/.freeCodeCamp/test/280.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here']); + + assert(/^~~ Questionnaire ~~$/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/290.test.js b/.freeCodeCamp/test/290.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/290.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/30.test.js b/.freeCodeCamp/test/30.test.js new file mode 100644 index 0000000000..b2c1d81501 --- /dev/null +++ b/.freeCodeCamp/test/30.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should echo the correct text', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + + assert(/^\s*echo[ \t]+hello[ \t]+questionnaire[ \t]*;?\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/300.test.js b/.freeCodeCamp/test/300.test.js new file mode 100644 index 0000000000..80349d4737 --- /dev/null +++ b/.freeCodeCamp/test/300.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'echo' && lastCommand[1] === '--help'); + }); +}); diff --git a/.freeCodeCamp/test/310.test.js b/.freeCodeCamp/test/310.test.js new file mode 100644 index 0000000000..9b31c172ca --- /dev/null +++ b/.freeCodeCamp/test/310.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'man' && lastCommand[1] === 'echo'); + }); +}); diff --git a/.freeCodeCamp/test/320.test.js b/.freeCodeCamp/test/320.test.js new file mode 100644 index 0000000000..76918bfdcd --- /dev/null +++ b/.freeCodeCamp/test/320.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here']); + + assert(/^n~~ Questionnaire ~~n$/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/323.test.js b/.freeCodeCamp/test/323.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/323.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/326.test.js b/.freeCodeCamp/test/326.test.js new file mode 100644 index 0000000000..816e64004d --- /dev/null +++ b/.freeCodeCamp/test/326.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here']); + + assert(/^\n~~ Questionnaire ~~\n{2}/g.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/330.test.js b/.freeCodeCamp/test/330.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/330.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/340.test.js b/.freeCodeCamp/test/340.test.js new file mode 100644 index 0000000000..7691c94f40 --- /dev/null +++ b/.freeCodeCamp/test/340.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable added correctly', async () => { + const output = await appendAndRun('../questionnaire.sh', 'echo $QUESTION3', options = { input: ['me', 'here'] }); + + assert(/^What's your favorite coding website\?$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/345.test.js b/.freeCodeCamp/test/345.test.js new file mode 100644 index 0000000000..2d2c302625 --- /dev/null +++ b/.freeCodeCamp/test/345.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested variable correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here']); + + assert(/^\s*echo[ \t]+('|")?\$QUESTION3\1?[ \t]*;?\s*$/gm.test(scriptFile) && /^What's your favorite coding website\?$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/35.test.js b/.freeCodeCamp/test/35.test.js new file mode 100644 index 0000000000..db32aa3b96 --- /dev/null +++ b/.freeCodeCamp/test/35.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the "sh" command', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'sh' && /^(\.\/)?questionnaire\.sh$/gm.test(lastCommand[1]) && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/350.test.js b/.freeCodeCamp/test/350.test.js new file mode 100644 index 0000000000..812c2b5a53 --- /dev/null +++ b/.freeCodeCamp/test/350.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should use "read" to get input into the correct variable', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await appendAndRun('../questionnaire.sh', 'echo $WEBSITE', options = { input: ['me', 'here', 'freeCodeCamp'] }); + + assert(/^\s*read[ \t]+WEBSITE[ \t]*;?\s*$/gm.test(scriptFile) && /^freeCodeCamp$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/360.test.js b/.freeCodeCamp/test/360.test.js new file mode 100644 index 0000000000..ab4b25e8da --- /dev/null +++ b/.freeCodeCamp/test/360.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here', 'freeCodeCamp']); + + assert(/^\s*echo[ \t]+('|"|)Hello[ \t]+\$NAME from \$LOCATION\. I learned that your favorite coding website is \$WEBSITE!\1[ \t]*;?\s*$/gm.test(scriptFile) && /^Hello me from here. I learned that your favorite coding website is freeCodeCamp!$/gm.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/363.test.js b/.freeCodeCamp/test/363.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/363.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/366.test.js b/.freeCodeCamp/test/366.test.js new file mode 100644 index 0000000000..d108115ed1 --- /dev/null +++ b/.freeCodeCamp/test/366.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getScriptOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggested text correctly', async () => { + const output = await getScriptOutput('./questionnaire.sh', ['me', 'here', 'freeCodeCamp']); + + assert(/\n{2}Hello me from here\. I learned that your favorite coding website is freeCodeCamp!\n$/g.test(output)) + }); +}); diff --git a/.freeCodeCamp/test/370.test.js b/.freeCodeCamp/test/370.test.js new file mode 100644 index 0000000000..bd36645a36 --- /dev/null +++ b/.freeCodeCamp/test/370.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/380.test.js b/.freeCodeCamp/test/380.test.js new file mode 100644 index 0000000000..7d81173a0d --- /dev/null +++ b/.freeCodeCamp/test/380.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getDirectoryContents } = require('./utils'); + +describe('You', () => { + it('should use the "touch" command to create the correct file', async () => { + const directoryContents = await getDirectoryContents(`..`); + const lastCommand = await getLastCommand(); + + assert(directoryContents.includes('countdown.sh') && lastCommand[0] === 'touch' && /countdown.sh/g.test(lastCommand[1])); + }); +}); diff --git a/.freeCodeCamp/test/390.test.js b/.freeCodeCamp/test/390.test.js new file mode 100644 index 0000000000..00a90df9fb --- /dev/null +++ b/.freeCodeCamp/test/390.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { canExecute } = require('./utils'); + +describe('Your script file', () => { + it('should have executable permissions', async () => { + const fileIsExecutable = await canExecute('../countdown.sh'); + + assert(fileIsExecutable); + }); +}); diff --git a/.freeCodeCamp/test/40.test.js b/.freeCodeCamp/test/40.test.js new file mode 100644 index 0000000000..155a7f39c1 --- /dev/null +++ b/.freeCodeCamp/test/40.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the "sh" command', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'bash' && /^(\.\/)?questionnaire\.sh$/gm.test(lastCommand[1]) && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/400.test.js b/.freeCodeCamp/test/400.test.js new file mode 100644 index 0000000000..342f421447 --- /dev/null +++ b/.freeCodeCamp/test/400.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct "shebang"', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/^\s*#![ \t]*\/bin\/bash\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/410.test.js b/.freeCodeCamp/test/410.test.js new file mode 100644 index 0000000000..9a1be0c48c --- /dev/null +++ b/.freeCodeCamp/test/410.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested comment added correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/^#[ \t]*Program that counts down to zero from a given argument[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/420.test.js b/.freeCodeCamp/test/420.test.js new file mode 100644 index 0000000000..17d82e7e8e --- /dev/null +++ b/.freeCodeCamp/test/420.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggestion correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/^[ \t]*echo[ \t]+\$(\*|@)[ \t]*;?[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/425.test.js b/.freeCodeCamp/test/425.test.js new file mode 100644 index 0000000000..34fc051215 --- /dev/null +++ b/.freeCodeCamp/test/425.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && (lastCommand[1] === undefined || lastCommand[1].op === ';') && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/430.test.js b/.freeCodeCamp/test/430.test.js new file mode 100644 index 0000000000..c893712587 --- /dev/null +++ b/.freeCodeCamp/test/430.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === 'arg1' && lastCommand[2] === 'arg2' && lastCommand[3] === 'arg3' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/440.test.js b/.freeCodeCamp/test/440.test.js new file mode 100644 index 0000000000..7fd57f9b32 --- /dev/null +++ b/.freeCodeCamp/test/440.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the suggestion correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/^[ \t]*echo[ \t]+\$1[ \t]*;?[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/450.test.js b/.freeCodeCamp/test/450.test.js new file mode 100644 index 0000000000..c893712587 --- /dev/null +++ b/.freeCodeCamp/test/450.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === 'arg1' && lastCommand[2] === 'arg2' && lastCommand[3] === 'arg3' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/460.test.js b/.freeCodeCamp/test/460.test.js new file mode 100644 index 0000000000..c04648cc46 --- /dev/null +++ b/.freeCodeCamp/test/460.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/470.test.js b/.freeCodeCamp/test/470.test.js new file mode 100644 index 0000000000..fa101ad09e --- /dev/null +++ b/.freeCodeCamp/test/470.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'man' && lastCommand[1] === 'if' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/480.test.js b/.freeCodeCamp/test/480.test.js new file mode 100644 index 0000000000..d2fd59f788 --- /dev/null +++ b/.freeCodeCamp/test/480.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'if' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/490.test.js b/.freeCodeCamp/test/490.test.js new file mode 100644 index 0000000000..0902e7118c --- /dev/null +++ b/.freeCodeCamp/test/490.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getCommandOutput, getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "if" statement added correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + const output1 = await getCommandOutput('./countdown.sh arg1'); + const output2 = await getCommandOutput('./countdown.sh'); + + assert(!/echo[ \t]+\$1/g.test(scriptFile) && /^true$/gm.test(output1) && !/^true$/gm.test(output2)); + }); +}); diff --git a/.freeCodeCamp/test/50.test.js b/.freeCodeCamp/test/50.test.js new file mode 100644 index 0000000000..0dfa6a3a04 --- /dev/null +++ b/.freeCodeCamp/test/50.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'which' && lastCommand[1] === 'bash'); + }); +}); diff --git a/.freeCodeCamp/test/500.test.js b/.freeCodeCamp/test/500.test.js new file mode 100644 index 0000000000..c073186759 --- /dev/null +++ b/.freeCodeCamp/test/500.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === 'arg1' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/505.test.js b/.freeCodeCamp/test/505.test.js new file mode 100644 index 0000000000..30fc0bacef --- /dev/null +++ b/.freeCodeCamp/test/505.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] !== 'arg1' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/510.test.js b/.freeCodeCamp/test/510.test.js new file mode 100644 index 0000000000..d0f6854719 --- /dev/null +++ b/.freeCodeCamp/test/510.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "if/else" statement added correctly', async () => { + const output1 = await getCommandOutput('./countdown.sh arg1'); + const output2 = await getCommandOutput('./countdown.sh'); + + assert(/^true$/gm.test(output1) && !/^false$/.test(output1) && !/^true$/gm.test(output2) && /^false$/gm.test(output2)); + }); +}); diff --git a/.freeCodeCamp/test/520.test.js b/.freeCodeCamp/test/520.test.js new file mode 100644 index 0000000000..30fc0bacef --- /dev/null +++ b/.freeCodeCamp/test/520.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] !== 'arg1' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/530.test.js b/.freeCodeCamp/test/530.test.js new file mode 100644 index 0000000000..b5222ed007 --- /dev/null +++ b/.freeCodeCamp/test/530.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested condition for your "if" statement', async () => { + const output1 = await getCommandOutput('./countdown.sh 4'); + const output2 = await getCommandOutput('./countdown.sh 5'); + + assert(/^true$/gm.test(output1) && !/^false$/.test(output1) && !/^true$/gm.test(output2) && /^false$/gm.test(output2)); + }); +}); diff --git a/.freeCodeCamp/test/540.test.js b/.freeCodeCamp/test/540.test.js new file mode 100644 index 0000000000..bca03f792f --- /dev/null +++ b/.freeCodeCamp/test/540.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '4' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/542.test.js b/.freeCodeCamp/test/542.test.js new file mode 100644 index 0000000000..daf57a31c6 --- /dev/null +++ b/.freeCodeCamp/test/542.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '5' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/544.test.js b/.freeCodeCamp/test/544.test.js new file mode 100644 index 0000000000..0bd6cfa26d --- /dev/null +++ b/.freeCodeCamp/test/544.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/546.test.js b/.freeCodeCamp/test/546.test.js new file mode 100644 index 0000000000..a88654f890 --- /dev/null +++ b/.freeCodeCamp/test/546.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === '[['); + }); +}); diff --git a/.freeCodeCamp/test/548.test.js b/.freeCodeCamp/test/548.test.js new file mode 100644 index 0000000000..cee7b8032d --- /dev/null +++ b/.freeCodeCamp/test/548.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'test'); + }); +}); diff --git a/.freeCodeCamp/test/550.test.js b/.freeCodeCamp/test/550.test.js new file mode 100644 index 0000000000..c1c481be73 --- /dev/null +++ b/.freeCodeCamp/test/550.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested condition for your "if" statement', async () => { + const output1 = await getCommandOutput('./countdown.sh 5'); + const output2 = await getCommandOutput('./countdown.sh 6'); + + assert(/^true$/gm.test(output1) && !/^false$/.test(output1) && !/^true$/gm.test(output2) && /^false$/gm.test(output2)); + }); +}); diff --git a/.freeCodeCamp/test/552.test.js b/.freeCodeCamp/test/552.test.js new file mode 100644 index 0000000000..daf57a31c6 --- /dev/null +++ b/.freeCodeCamp/test/552.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct arguments', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '5' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/554.test.js b/.freeCodeCamp/test/554.test.js new file mode 100644 index 0000000000..4d9eae2985 --- /dev/null +++ b/.freeCodeCamp/test/554.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === '[[' && lastCommand[1] === '4' && lastCommand[2] === '-le' && lastCommand[3] === '5' && lastCommand[4] === ']]' && (lastCommand[5] === undefined || lastCommand[5].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/556.test.js b/.freeCodeCamp/test/556.test.js new file mode 100644 index 0000000000..9e754f60dc --- /dev/null +++ b/.freeCodeCamp/test/556.test.js @@ -0,0 +1,13 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + // second to last command + const slc = await getLastCommand(1); + const slcTest = slc[0] === '[[' && slc[1] === '4' && slc[2] === '-le' && slc[3] === '5' && slc[4] === ']]' && (slc[5] === undefined || slc[5].op === ';'); + + assert(/^[ \t]*echo[ \t]+\$\?[ \t]*;?[ \t]*$/.test(lastCommand) && slcTest); + }); +}); diff --git a/.freeCodeCamp/test/558.test.js b/.freeCodeCamp/test/558.test.js new file mode 100644 index 0000000000..5e2e87fb39 --- /dev/null +++ b/.freeCodeCamp/test/558.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === '[[' && lastCommand[1] === '4' && lastCommand[2] === '-ge' && lastCommand[3] === '5' && lastCommand[4] === ']]' && (lastCommand[5] === undefined || lastCommand[5].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/560.test.js b/.freeCodeCamp/test/560.test.js new file mode 100644 index 0000000000..1a1adf58a6 --- /dev/null +++ b/.freeCodeCamp/test/560.test.js @@ -0,0 +1,13 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + const secondToLastCommand = await getLastCommand(1); + const slc = secondToLastCommand; + const slcTest = slc[0] === '[[' && slc[1] === '4' && slc[2] === '-ge' && slc[3] === '5' && slc[4] === ']]' && (slc[5] === undefined || slc[5].op === ';'); + + assert(/echo[ \t]+\$\?[ \t]*;?[ \t]*$/.test(lastCommand) && slcTest); + }); +}); diff --git a/.freeCodeCamp/test/562.test.js b/.freeCodeCamp/test/562.test.js new file mode 100644 index 0000000000..9a59bf9cd5 --- /dev/null +++ b/.freeCodeCamp/test/562.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+4\s+-ge\s+5\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/564.test.js b/.freeCodeCamp/test/564.test.js new file mode 100644 index 0000000000..661b894805 --- /dev/null +++ b/.freeCodeCamp/test/564.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+10\s+-ne\s+5\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/566.test.js b/.freeCodeCamp/test/566.test.js new file mode 100644 index 0000000000..7eda6bac0c --- /dev/null +++ b/.freeCodeCamp/test/566.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*bad_command\s*;\s*echo\s+\$\?\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/568.test.js b/.freeCodeCamp/test/568.test.js new file mode 100644 index 0000000000..68fd567403 --- /dev/null +++ b/.freeCodeCamp/test/568.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*ls\s*;\s*echo\s+\$\?\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/570.test.js b/.freeCodeCamp/test/570.test.js new file mode 100644 index 0000000000..084a57dbfb --- /dev/null +++ b/.freeCodeCamp/test/570.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*ls\s+-y\s*;\s*echo\s+\$\?\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/572.test.js b/.freeCodeCamp/test/572.test.js new file mode 100644 index 0000000000..cee7b8032d --- /dev/null +++ b/.freeCodeCamp/test/572.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'test'); + }); +}); diff --git a/.freeCodeCamp/test/574.test.js b/.freeCodeCamp/test/574.test.js new file mode 100644 index 0000000000..14560fd7cf --- /dev/null +++ b/.freeCodeCamp/test/574.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+-a\s+(\.\/)?countdown\.sh\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/g.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/575.test.js b/.freeCodeCamp/test/575.test.js new file mode 100644 index 0000000000..e826d27be5 --- /dev/null +++ b/.freeCodeCamp/test/575.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+-a\s+(\.\/)?bad_file\.txt\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/g.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/576.test.js b/.freeCodeCamp/test/576.test.js new file mode 100644 index 0000000000..c745171f8f --- /dev/null +++ b/.freeCodeCamp/test/576.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested commands in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+-x\s+(\.\/)?countdown\.sh\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/g.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/582.test.js b/.freeCodeCamp/test/582.test.js new file mode 100644 index 0000000000..a88654f890 --- /dev/null +++ b/.freeCodeCamp/test/582.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === '[['); + }); +}); diff --git a/.freeCodeCamp/test/584.test.js b/.freeCodeCamp/test/584.test.js new file mode 100644 index 0000000000..fc5995f58d --- /dev/null +++ b/.freeCodeCamp/test/584.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested commands in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+-x\s+(\.\/)?countdown\.sh\s+&&\s+5\s+-le\s+4\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/g.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/586.test.js b/.freeCodeCamp/test/586.test.js new file mode 100644 index 0000000000..843311636e --- /dev/null +++ b/.freeCodeCamp/test/586.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested commands in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\[\[\s+-x\s+(\.\/)?countdown\.sh\s+\|\|\s+5\s+-le\s+4\s+\]\]\s*;\s*echo\s+\$\?\s*;?\s*$/g.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/588.test.js b/.freeCodeCamp/test/588.test.js new file mode 100644 index 0000000000..a02625e33a --- /dev/null +++ b/.freeCodeCamp/test/588.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "if/else" statement added correctly', async () => { + const output1 = await getCommandOutput('./countdown.sh 1'); + const output2 = await getCommandOutput('./countdown.sh 0'); + + assert(/^true$/gm.test(output1) && !/^false$/.test(output1) && !/^true$/gm.test(output2) && /^false$/gm.test(output2)); + }); +}); diff --git a/.freeCodeCamp/test/590.test.js b/.freeCodeCamp/test/590.test.js new file mode 100644 index 0000000000..48d2d51edf --- /dev/null +++ b/.freeCodeCamp/test/590.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "if/else" statement added correctly', async () => { + const output1 = await getCommandOutput('./countdown.sh 1'); + const output2 = await getCommandOutput('./countdown.sh 0'); + + assert(/^true$/gm.test(output1) && !/^false$/.test(output1) && !/^true$/gm.test(output2) && /^Include a positive integer as the first argument\.$/gm.test(output2)); + }); +}); diff --git a/.freeCodeCamp/test/60.test.js b/.freeCodeCamp/test/60.test.js new file mode 100644 index 0000000000..d30b48fbbc --- /dev/null +++ b/.freeCodeCamp/test/60.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct "shebang"', async () => { + const scriptFile = await getFileContents('../questionnaire.sh'); + + assert(/^\s*#![ \t]*\/bin\/bash\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/600.test.js b/.freeCodeCamp/test/600.test.js new file mode 100644 index 0000000000..da2dd922ee --- /dev/null +++ b/.freeCodeCamp/test/600.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '1' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/610.test.js b/.freeCodeCamp/test/610.test.js new file mode 100644 index 0000000000..b1ac105cd7 --- /dev/null +++ b/.freeCodeCamp/test/610.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + const arg = parseInt(lastCommand[1]); + + assert(lastCommand[0] === './countdown.sh' && (arg < 1 || isNaN(arg) || /\./.test(lastCommand[1])) && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/615.test.js b/.freeCodeCamp/test/615.test.js new file mode 100644 index 0000000000..0bd6cfa26d --- /dev/null +++ b/.freeCodeCamp/test/615.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/620.test.js b/.freeCodeCamp/test/620.test.js new file mode 100644 index 0000000000..0c99573e3b --- /dev/null +++ b/.freeCodeCamp/test/620.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "for" loop added correctly', async () => { + const output = await getCommandOutput('./countdown.sh 3'); + + assert(/^3\n2\n1\n$/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/630.test.js b/.freeCodeCamp/test/630.test.js new file mode 100644 index 0000000000..0cd5d81e92 --- /dev/null +++ b/.freeCodeCamp/test/630.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '10' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/640.test.js b/.freeCodeCamp/test/640.test.js new file mode 100644 index 0000000000..c04648cc46 --- /dev/null +++ b/.freeCodeCamp/test/640.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/650.test.js b/.freeCodeCamp/test/650.test.js new file mode 100644 index 0000000000..3aa3c90028 --- /dev/null +++ b/.freeCodeCamp/test/650.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'ls' && lastCommand[1] === '/' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/660.test.js b/.freeCodeCamp/test/660.test.js new file mode 100644 index 0000000000..3296c0477a --- /dev/null +++ b/.freeCodeCamp/test/660.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'ls' && lastCommand[1] === '/bin' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/670.test.js b/.freeCodeCamp/test/670.test.js new file mode 100644 index 0000000000..f42944ffd6 --- /dev/null +++ b/.freeCodeCamp/test/670.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'man' && lastCommand[1] === 'sleep'); + }); +}); diff --git a/.freeCodeCamp/test/675.test.js b/.freeCodeCamp/test/675.test.js new file mode 100644 index 0000000000..7bb7ef27ff --- /dev/null +++ b/.freeCodeCamp/test/675.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'sleep' && lastCommand[1] === '3' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/680.test.js b/.freeCodeCamp/test/680.test.js new file mode 100644 index 0000000000..5bff6a0efe --- /dev/null +++ b/.freeCodeCamp/test/680.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "for" loop added correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/^\s*sleep[ \t]+1[ \t]*;?[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/690.test.js b/.freeCodeCamp/test/690.test.js new file mode 100644 index 0000000000..34df8a549d --- /dev/null +++ b/.freeCodeCamp/test/690.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '3' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/692.test.js b/.freeCodeCamp/test/692.test.js new file mode 100644 index 0000000000..2afc0a914b --- /dev/null +++ b/.freeCodeCamp/test/692.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "for" loop added correctly', async () => { + const output = await getCommandOutput('./countdown.sh 1'); + + assert(/^1\n0\n$/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/694.test.js b/.freeCodeCamp/test/694.test.js new file mode 100644 index 0000000000..393c7d8655 --- /dev/null +++ b/.freeCodeCamp/test/694.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '3' && (lastCommand[2] === undefined || lastCommand[2].op === ';') && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/696.test.js b/.freeCodeCamp/test/696.test.js new file mode 100644 index 0000000000..fa885f2a5c --- /dev/null +++ b/.freeCodeCamp/test/696.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the correct title', async () => { + const output = await getCommandOutput('./countdown.sh 1'); + + assert(/^\n~~ Countdown Timer ~~\n{2}1\n0\n/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/698.test.js b/.freeCodeCamp/test/698.test.js new file mode 100644 index 0000000000..686b39820e --- /dev/null +++ b/.freeCodeCamp/test/698.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '1' && (lastCommand[2] === undefined || lastCommand[2].op === ';') && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/70.test.js b/.freeCodeCamp/test/70.test.js new file mode 100644 index 0000000000..ed8cf4869c --- /dev/null +++ b/.freeCodeCamp/test/70.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './questionnaire.sh' && /\/project$/.test(cwd)); + }); +}); \ No newline at end of file diff --git a/.freeCodeCamp/test/700.test.js b/.freeCodeCamp/test/700.test.js new file mode 100644 index 0000000000..966631383e --- /dev/null +++ b/.freeCodeCamp/test/700.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested comment added correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + const output = await getCommandOutput('./countdown.sh 1'); + + assert(/^\n~~ Countdown Timer ~~\n{2}/g.test(output) && !/1/g.test(output) && /:[ \t]+'[^']*'[ \t]*?\n+/g.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/710.test.js b/.freeCodeCamp/test/710.test.js new file mode 100644 index 0000000000..f3482a3f05 --- /dev/null +++ b/.freeCodeCamp/test/710.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'while'); + }); +}); diff --git a/.freeCodeCamp/test/730.test.js b/.freeCodeCamp/test/730.test.js new file mode 100644 index 0000000000..0f899bb939 --- /dev/null +++ b/.freeCodeCamp/test/730.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable added correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + const output = await appendAndRun('../countdown.sh', 'echo $I', { args: [1] }); + + assert(/1/g.test(output) && /I=('|"|)\$1\1/.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/740.test.js b/.freeCodeCamp/test/740.test.js new file mode 100644 index 0000000000..459721e459 --- /dev/null +++ b/.freeCodeCamp/test/740.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "while" loop added correctly', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/[ \t]*while[ \t]+\[\[[ \t]+\$I[ \t]+-ge[ \t]+0[ \t]+\]\][ \t]*(;\s*|;?[ \t]*\n+)[ \t]*do\s*echo[ \t]+\$I[ \t]*(;\s*|;?[ \t]*\n+)[ \t]*done[ \t]*(;|[ \t]*\n+)/g.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/750.test.js b/.freeCodeCamp/test/750.test.js new file mode 100644 index 0000000000..1f4f92c503 --- /dev/null +++ b/.freeCodeCamp/test/750.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct math in the "while" loop', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/[ \t]*while[ \t]+\[\[[ \t]+\$I[ \t]+-ge[ \t]+0[ \t]+\]\][ \t]*(;\s*|;?[ \t]*\n+)[ \t]*do\s*echo[ \t]+\$I[ \t]*(;\s*|;?[ \t]*\n+)[ \t]*\(\([ \t]*I[ \t]*--[ \t]*\)\)[ \t]*(;\s*|;?[ \t]*\n+)[ \t]*done[ \t]*(;|[ \t]*\n+)/g.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/760.test.js b/.freeCodeCamp/test/760.test.js new file mode 100644 index 0000000000..8eab584f4c --- /dev/null +++ b/.freeCodeCamp/test/760.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should correctly have the "sleep" in the "while" loop', async () => { + const scriptFile = await getFileContents('../countdown.sh'); + + assert(/[ \t]*while[ \t]+\[\[[ \t]+\$I[ \t]+-ge[ \t]+0[ \t]+\]\][ \t]*(;\s*|;?[ \t]*\n+)[ \t]*do\s*echo[ \t]+\$I[ \t]*(;\s*|;?[ \t]*\n+)[ \t]*\(\([ \t]*I[ \t]*--[ \t]*\)\)[ \t]*(;\s*|;?[ \t]*\n+)[ \t]*sleep[ \t]+1(;\s*|;?[ \t]*\n+)[ \t]*done[ \t]*(;|[ \t]*\n+)/g.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/770.test.js b/.freeCodeCamp/test/770.test.js new file mode 100644 index 0000000000..86a396c9c0 --- /dev/null +++ b/.freeCodeCamp/test/770.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script with the correct argument', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './countdown.sh' && lastCommand[1] === '5' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/780.test.js b/.freeCodeCamp/test/780.test.js new file mode 100644 index 0000000000..56f8037955 --- /dev/null +++ b/.freeCodeCamp/test/780.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getDirectoryContents } = require('./utils'); + +describe('You', () => { + it('should use the "touch" command to create the correct file', async () => { + const directoryContents = await getDirectoryContents(`..`); + const lastCommand = await getLastCommand(); + + assert(directoryContents.includes('bingo.sh') && lastCommand[0] === 'touch' && /bingo.sh/g.test(lastCommand[1])); + }); +}); diff --git a/.freeCodeCamp/test/790.test.js b/.freeCodeCamp/test/790.test.js new file mode 100644 index 0000000000..133abed3dc --- /dev/null +++ b/.freeCodeCamp/test/790.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { canExecute } = require('./utils'); + +describe('Your script file', () => { + it('should have executable permissions', async () => { + const fileIsExecutable = await canExecute('../bingo.sh'); + + assert(fileIsExecutable); + }); +}); diff --git a/.freeCodeCamp/test/80.test.js b/.freeCodeCamp/test/80.test.js new file mode 100644 index 0000000000..7138ad8f9f --- /dev/null +++ b/.freeCodeCamp/test/80.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should "list" the folder contents with the correct flag', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'ls' && lastCommand[1] === '-l' && /\/project$/.test(cwd)); + }); +}); \ No newline at end of file diff --git a/.freeCodeCamp/test/800.test.js b/.freeCodeCamp/test/800.test.js new file mode 100644 index 0000000000..3b0811c60d --- /dev/null +++ b/.freeCodeCamp/test/800.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the correct "shebang"', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + + assert(/^\s*#![ \t]*\/bin\/bash\s*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/810.test.js b/.freeCodeCamp/test/810.test.js new file mode 100644 index 0000000000..14b3bfcab2 --- /dev/null +++ b/.freeCodeCamp/test/810.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested comment added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + + assert(/^#[ \t]*Bingo Number Generator[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/815.test.js b/.freeCodeCamp/test/815.test.js new file mode 100644 index 0000000000..6368046daa --- /dev/null +++ b/.freeCodeCamp/test/815.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should "echo" the correct title', async () => { + const output = await getCommandOutput('./bingo.sh'); + + assert(/^\n~~ Bingo Number Generator ~~\n{2}/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/817.test.js b/.freeCodeCamp/test/817.test.js new file mode 100644 index 0000000000..79e01e0b56 --- /dev/null +++ b/.freeCodeCamp/test/817.test.js @@ -0,0 +1,9 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); +describe('Your script', () => { + it('should have the suggested variable added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const output = await appendAndRun('../bingo.sh', 'echo $NUMBER'); + assert(/^\s*NUMBER=('|"|)5\1[ \t]*;?[ \t]*$/gm.test(scriptFile) && /^5$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/818.test.js b/.freeCodeCamp/test/818.test.js new file mode 100644 index 0000000000..b7328145be --- /dev/null +++ b/.freeCodeCamp/test/818.test.js @@ -0,0 +1,8 @@ +const assert = require('assert'); +const { getCommandOutput } = require('./utils'); +describe('Your script', () => { + it('should "echo" the suggested variable correctly', async () => { + const output = await getCommandOutput('./bingo.sh'); + assert(/5/g.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/819.test.js b/.freeCodeCamp/test/819.test.js new file mode 100644 index 0000000000..32eb9bd970 --- /dev/null +++ b/.freeCodeCamp/test/819.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './bingo.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/820.test.js b/.freeCodeCamp/test/820.test.js new file mode 100644 index 0000000000..49c080c5c7 --- /dev/null +++ b/.freeCodeCamp/test/820.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'printenv' && (lastCommand[1] === undefined || lastCommand[1].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/822.test.js b/.freeCodeCamp/test/822.test.js new file mode 100644 index 0000000000..b749d6f5d1 --- /dev/null +++ b/.freeCodeCamp/test/822.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo[ \t]+\$LANG[ \t]*;?\s*$/gm.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/824.test.js b/.freeCodeCamp/test/824.test.js new file mode 100644 index 0000000000..c441314118 --- /dev/null +++ b/.freeCodeCamp/test/824.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'declare' && lastCommand[1] === '-p' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/826.test.js b/.freeCodeCamp/test/826.test.js new file mode 100644 index 0000000000..6374fdd8c7 --- /dev/null +++ b/.freeCodeCamp/test/826.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo[ \t]+\$RANDOM[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/828.test.js b/.freeCodeCamp/test/828.test.js new file mode 100644 index 0000000000..7ce3d96cd7 --- /dev/null +++ b/.freeCodeCamp/test/828.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + + assert(/^\s*NUMBER=('|"|)\$RANDOM\1[ \t]*;?[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/830.test.js b/.freeCodeCamp/test/830.test.js new file mode 100644 index 0000000000..6007bc3b71 --- /dev/null +++ b/.freeCodeCamp/test/830.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + const secondLastCommand = await getLastCommand(1); + + assert(lastCommand[0] === './bingo.sh' && secondLastCommand[0] === './bingo.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/835.test.js b/.freeCodeCamp/test/835.test.js new file mode 100644 index 0000000000..21ff1bfa01 --- /dev/null +++ b/.freeCodeCamp/test/835.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getFileContents } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + + assert(/^\s*NUMBER=('|"|)\$RANDOM%75[ \t]*;?[ \t]*$/gm.test(scriptFile)); + }); +}); diff --git a/.freeCodeCamp/test/840.test.js b/.freeCodeCamp/test/840.test.js new file mode 100644 index 0000000000..32eb9bd970 --- /dev/null +++ b/.freeCodeCamp/test/840.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === './bingo.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/881.test.js b/.freeCodeCamp/test/881.test.js new file mode 100644 index 0000000000..737fd892d9 --- /dev/null +++ b/.freeCodeCamp/test/881.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*I=('|"|)0\1[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/884.test.js b/.freeCodeCamp/test/884.test.js new file mode 100644 index 0000000000..da7ceb9d90 --- /dev/null +++ b/.freeCodeCamp/test/884.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo[ \t]+('|"|)\$I\1[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/887.test.js b/.freeCodeCamp/test/887.test.js new file mode 100644 index 0000000000..f097591937 --- /dev/null +++ b/.freeCodeCamp/test/887.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\(\(\s*\$?I\s*\+\+\s*\)\)\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/890.test.js b/.freeCodeCamp/test/890.test.js new file mode 100644 index 0000000000..da7ceb9d90 --- /dev/null +++ b/.freeCodeCamp/test/890.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo[ \t]+('|"|)\$I\1[ \t]*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/891.test.js b/.freeCodeCamp/test/891.test.js new file mode 100644 index 0000000000..fd263c04b0 --- /dev/null +++ b/.freeCodeCamp/test/891.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'let'); + }); +}); diff --git a/.freeCodeCamp/test/893.test.js b/.freeCodeCamp/test/893.test.js new file mode 100644 index 0000000000..c83bbf3f10 --- /dev/null +++ b/.freeCodeCamp/test/893.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\(\(\s*\$?I\s*\+=\s*10\s*\)\)\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/896.test.js b/.freeCodeCamp/test/896.test.js new file mode 100644 index 0000000000..d2635abd93 --- /dev/null +++ b/.freeCodeCamp/test/896.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+('|"|)\$I\1\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/897.test.js b/.freeCodeCamp/test/897.test.js new file mode 100644 index 0000000000..0c1c1762d3 --- /dev/null +++ b/.freeCodeCamp/test/897.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*\$\(\(\s*\$?I\s*\+\s*4\s*\)\)\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/899.test.js b/.freeCodeCamp/test/899.test.js new file mode 100644 index 0000000000..bb2390ce63 --- /dev/null +++ b/.freeCodeCamp/test/899.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+\$\(\(\s*\$?I\s*\+\s*4\s*\)\)\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/90.test.js b/.freeCodeCamp/test/90.test.js new file mode 100644 index 0000000000..34981bf476 --- /dev/null +++ b/.freeCodeCamp/test/90.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { canExecute } = require('./utils'); + +describe('Your script file', () => { + it('should have executable permissions', async () => { + const fileIsExecutable = await canExecute('../questionnaire.sh'); + + assert(fileIsExecutable); + }); +}); diff --git a/.freeCodeCamp/test/902.test.js b/.freeCodeCamp/test/902.test.js new file mode 100644 index 0000000000..d2635abd93 --- /dev/null +++ b/.freeCodeCamp/test/902.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+('|"|)\$I\1\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/905.test.js b/.freeCodeCamp/test/905.test.js new file mode 100644 index 0000000000..a1cf207602 --- /dev/null +++ b/.freeCodeCamp/test/905.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*J=('|"|)\$\(\(\s*\$?I\s*\-\s*6\s*\)\)\s*\1\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/908.test.js b/.freeCodeCamp/test/908.test.js new file mode 100644 index 0000000000..3d023a84f1 --- /dev/null +++ b/.freeCodeCamp/test/908.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+('|"|)\$J\1\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/911.test.js b/.freeCodeCamp/test/911.test.js new file mode 100644 index 0000000000..2afd8ad6eb --- /dev/null +++ b/.freeCodeCamp/test/911.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+\$\(\(\s*\$?J\s*\*\s*5\s*\+\s*25\s*\)\)\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/912.test.js b/.freeCodeCamp/test/912.test.js new file mode 100644 index 0000000000..3d023a84f1 --- /dev/null +++ b/.freeCodeCamp/test/912.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+('|"|)\$J\1\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/913.test.js b/.freeCodeCamp/test/913.test.js new file mode 100644 index 0000000000..c441314118 --- /dev/null +++ b/.freeCodeCamp/test/913.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'declare' && lastCommand[1] === '-p' && (lastCommand[2] === undefined || lastCommand[2].op === ';')); + }); +}); diff --git a/.freeCodeCamp/test/914.test.js b/.freeCodeCamp/test/914.test.js new file mode 100644 index 0000000000..51663d0f01 --- /dev/null +++ b/.freeCodeCamp/test/914.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'declare' && lastCommand[1] === '-p' && lastCommand[2] === 'J'); + }); +}); diff --git a/.freeCodeCamp/test/916.test.js b/.freeCodeCamp/test/916.test.js new file mode 100644 index 0000000000..d860e1a992 --- /dev/null +++ b/.freeCodeCamp/test/916.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'declare' && lastCommand[1] === '-p' && lastCommand[2] === 'RANDOM'); + }); +}); diff --git a/.freeCodeCamp/test/918.test.js b/.freeCodeCamp/test/918.test.js new file mode 100644 index 0000000000..c4dfdf595f --- /dev/null +++ b/.freeCodeCamp/test/918.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo[ \t]+\$\(\([ \t]*\$?RANDOM[ \t]*%[ \t]*75[ \t]*\)\)[ \t]*;?\s*$/gm.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/920.test.js b/.freeCodeCamp/test/920.test.js new file mode 100644 index 0000000000..c7763f4d14 --- /dev/null +++ b/.freeCodeCamp/test/920.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(0, false); + + assert(/^\s*echo\s+('|"|)\$\(\(\s*\$?RANDOM\s*%\s*75\s*\+\s*1\s*\)\)\1\s*;?\s*$/.test(lastCommand)); + }); +}); diff --git a/.freeCodeCamp/test/928.test.js b/.freeCodeCamp/test/928.test.js new file mode 100644 index 0000000000..e2cf34d614 --- /dev/null +++ b/.freeCodeCamp/test/928.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, getCommandOutput } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const output = await getCommandOutput('./bingo.sh'); + + assert(/^\s*NUMBER=('|"|)\$\(\([ \t]*\$?RANDOM[ \t]*%[ \t]*75[ \t]*\+[ \t]*1[ \t]*\)\)\1[ \t]*;?\s*$/gm.test(scriptFile) && /^\d{1,2}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/930.test.js b/.freeCodeCamp/test/930.test.js new file mode 100644 index 0000000000..6900e8e496 --- /dev/null +++ b/.freeCodeCamp/test/930.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getLastCommand, getCwd } = require('./utils'); + +describe('You', () => { + it('should run your script by executing it', async () => { + const cwd = await getCwd(); + const lastCommand = await getLastCommand(); + const secondLastCommand = await getLastCommand(1); + + assert(lastCommand[0] === './bingo.sh' && secondLastCommand[0] === './bingo.sh' && /\/project$/.test(cwd)); + }); +}); diff --git a/.freeCodeCamp/test/940.test.js b/.freeCodeCamp/test/940.test.js new file mode 100644 index 0000000000..eb5aad2733 --- /dev/null +++ b/.freeCodeCamp/test/940.test.js @@ -0,0 +1,11 @@ +const assert = require('assert'); +const { getFileContents, appendAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested variable added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const output = await appendAndRun('../bingo.sh', 'echo $TEXT'); + + assert(/^\s*TEXT=('|"|)The next number is, \1[ \t]*;?\s*$/gm.test(scriptFile) && /^The next number is,$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/945.test.js b/.freeCodeCamp/test/945.test.js new file mode 100644 index 0000000000..fd263c04b0 --- /dev/null +++ b/.freeCodeCamp/test/945.test.js @@ -0,0 +1,10 @@ +const assert = require('assert'); +const { getLastCommand } = require('./utils'); + +describe('You', () => { + it('should enter the suggested command in the terminal', async () => { + const lastCommand = await getLastCommand(); + + assert(lastCommand[0] === 'help' && lastCommand[1] === 'let'); + }); +}); diff --git a/.freeCodeCamp/test/950.test.js b/.freeCodeCamp/test/950.test.js new file mode 100644 index 0000000000..3f53420218 --- /dev/null +++ b/.freeCodeCamp/test/950.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getFileContents, replaceAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "if" statement added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const re = /75/g; + const output = await replaceAndRun('../bingo.sh', re, '15'); + + assert(/^\s*if[ \t]+\(\([ \t]*\$?NUMBER[ \t]*<=[ \t]*15[ \t]*\)\)/gm.test(scriptFile) && !/echo[ \t]+\$NUMBER/.test(scriptFile) && /^The next number is, B:\d{1,2}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/960.test.js b/.freeCodeCamp/test/960.test.js new file mode 100644 index 0000000000..d0b1e4627a --- /dev/null +++ b/.freeCodeCamp/test/960.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getFileContents, replaceAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "elif" statement added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const re = /75\s*\+\s*1/g; + const output = await replaceAndRun('../bingo.sh', re, '15+16'); + + assert(/elif[ \t]+\[\[[ \t]+\$NUMBER[ \t]+-le[ \t]+30[ \t]+\]\]/gm.test(scriptFile) && /^The next number is, I:\d{1,2}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/970.test.js b/.freeCodeCamp/test/970.test.js new file mode 100644 index 0000000000..101ad7ecbc --- /dev/null +++ b/.freeCodeCamp/test/970.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getFileContents, replaceAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "elif" statement added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const re = /75\s*\+\s*1/g; + const output = await replaceAndRun('../bingo.sh', re, '15+31'); + + assert(/elif[ \t]+\(\([ \t]*\$?NUMBER[ \t]*<[ \t]*46[ \t]*\)\)/gm.test(scriptFile) && /^The next number is, N:\d{1,2}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/980.test.js b/.freeCodeCamp/test/980.test.js new file mode 100644 index 0000000000..0ad0f439b9 --- /dev/null +++ b/.freeCodeCamp/test/980.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getFileContents, replaceAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "elif" statement added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const re = /75\s*\+\s*1/g; + const output = await replaceAndRun('../bingo.sh', re, '15+46'); + + assert(/elif[ \t]+\[\[[ \t]+\$NUMBER[ \t]+-lt[ \t]+61[ \t]+\]\]/gm.test(scriptFile) && /^The next number is, G:\d{1,2}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/990.test.js b/.freeCodeCamp/test/990.test.js new file mode 100644 index 0000000000..f351a991e0 --- /dev/null +++ b/.freeCodeCamp/test/990.test.js @@ -0,0 +1,12 @@ +const assert = require('assert'); +const { getFileContents, replaceAndRun } = require('./utils'); + +describe('Your script', () => { + it('should have the suggested "else" statement added correctly', async () => { + const scriptFile = await getFileContents('../bingo.sh'); + const re = /75\s*\+\s*1/g; + const output = await replaceAndRun('../bingo.sh', re, '15+61'); + + assert(/else\s+echo[ \t]+\$TEXT O:\$NUMBER\s+/gm.test(scriptFile) && /^The next number is, O:\d{1,2}$/gm.test(output)); + }); +}); diff --git a/.freeCodeCamp/test/utils.js b/.freeCodeCamp/test/utils.js new file mode 100644 index 0000000000..65fcc970ad --- /dev/null +++ b/.freeCodeCamp/test/utils.js @@ -0,0 +1,170 @@ +const fs = require('fs'); +const util = require('util'); +const path = require('path'); +const parseCommand = require('shell-quote').parse; +const execute = util.promisify(require('child_process').exec); +const { exec } = require('promisify-child-process'); + +const readFile = util.promisify(fs.readFile); +const readdir = util.promisify(fs.readdir); + +const getLastCommand = async (howManyBack = 0, parse = true, dir = process.cwd()) => { + const pathToBashLogs = path.join(dir, '../../', '.bash_history'); + const bashLogs = await readFile(pathToBashLogs, 'utf8'); + + if (!bashLogs) { + throw new Error(`Could not find ${pathToBashLogs}`); + } + + const logs = bashLogs.split('\n'); + const lastLog = logs[logs.length - howManyBack - 2]; + + if(parse) { + return parseCommand(lastLog); + } else { + return lastLog; + } +}; + +const getNextCommand = async (howManyBack = 2, dir = process.cwd()) => { + const pathToNextCommandLogs = path.join(dir, './test', '.next_command'); + const nextCommandLogs = await readFile(pathToNextCommandLogs, 'utf8'); + + if (!nextCommandLogs) { + throw new Error(`Could not find ${pathToNextCommandLogs}`); + } + + const logs = nextCommandLogs.split('\n'); + const nextCommand = logs[logs.length - howManyBack]; + const parsedCommand = parseCommand(nextCommand); + + return parsedCommand; +}; + +const getCwd = async (dir = process.cwd()) => { + const pathToCwdLogs = path.join(dir, './test', '.cwd'); + const cwdLogs = await readFile(pathToCwdLogs, 'utf8'); + + if (!cwdLogs) { + throw new Error(`Could not find ${pathToCwdLogs}`); + } + + const logs = cwdLogs.split('\n'); + const lastLog = logs[logs.length - 2]; + + return lastLog; +}; + +const getPreviousCwd = async (dir = process.cwd()) => { + const pathToCwdLogs = path.join(dir, './test', '.cwd'); + const cwdLogs = await readFile(pathToCwdLogs, 'utf8'); + + if (!cwdLogs) { + throw new Error(`Could not find ${pathToCwdLogs}`); + } + + const logs = cwdLogs.split('\n'); + const previousLog = logs[logs.length - 3]; + + return previousLog; +}; + +const getDirectoryContents = async (dir = process.cwd()) => { + const directoryContents = await readdir(dir); + + if (!directoryContents) { + throw new Error(`Could not find folder ${dir}`); + } + + return directoryContents; +}; + +const getFileContents = async (file = process.cwd()) => { + const fileContents = await readFile(file); + + if (!fileContents) { + throw new Error(`Could not read file ${file}`); + } + + return fileContents.toString(); +}; + +const getCommandOutput = async function(command) { + const { stdout } = await execute(command, { cwd: '..', shell: '/bin/bash' }); + return stdout; +} + +const canExecute = async function(file) { + try { + fs.accessSync(file, fs.constants.X_OK); + return true; + } catch (err) { + return false; + } +} + +const removeWhitespace = async function(string) { + return string.replace(/\s/g, ''); +} + +const getScriptOutput = async function(command, input = []) { + let nextInput = 0; + + const child = exec(command, {cwd: '..'}); + child.stdout.on('data', () => { + if(nextInput < input.length) { + child.stdin.write(`${input[nextInput++] || ''}\n`); + } + }); + + child.stderr.on('data', err => { + console.log(`An error occurred running ${command}`); + console.log(err); + }); + + setTimeout(() => { + child.kill(); + }, 1000); + + const { stdout } = await child; + return stdout; +}; + +const appendAndRun = async function(file, string, options = { input: [], args: [] }) { + const { input = [], args = []} = options; + const fileContents = await getFileContents(file); + const appended = `${fileContents}\n${string}`; + + fs.writeFileSync('test.sh', appended); + fs.chmodSync('test.sh', '755'); + + const commandOutput = await getScriptOutput(`./.freeCodeCamp/test.sh ${args.join(' ')}`, input); + + return commandOutput; +} + +const replaceAndRun = async function(file, oldString, newString, options = { input: [], args: [] }) { + const { input = [], args = []} = options; + const fileContents = await getFileContents(file); + const replaced = fileContents.replace(oldString, newString); + + fs.writeFileSync('test.sh', replaced); + fs.chmodSync('test.sh', '755'); + + const commandOutput = await getScriptOutput(`./.freeCodeCamp/test.sh ${args.join(' ')}`, input); + + return commandOutput; +} + +exports.getLastCommand = getLastCommand; +exports.getNextCommand = getNextCommand; +exports.getCwd = getCwd; +exports.getPreviousCwd = getPreviousCwd; +exports.getDirectoryContents = getDirectoryContents; +exports.getFileContents = getFileContents; +exports.getCommandOutput = getCommandOutput; +exports.canExecute = canExecute; +exports.removeWhitespace = removeWhitespace; +exports.getScriptOutput = getScriptOutput; +exports.appendAndRun = appendAndRun; +exports.replaceAndRun = replaceAndRun; From a0d82801943314cf6d8a0d96c9db349d4243df38 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 9 Sep 2020 11:33:19 -0500 Subject: [PATCH 02/86] 10.1 --- .freeCodeCamp/.mocharc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 717711d3dc..ce03adf7cb 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,8 +1,8 @@ { - "spec": ["./test/*.js"], + "spec": ["./test/10.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", "exit": "true", - "grep": "/passAllTests/" + "grep": "/./" } \ No newline at end of file From 9509d5161e154cc4ddb7da61b910949ce883a011 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:41:34 +0000 Subject: [PATCH 03/86] Save progress: 10.1 --- .freeCodeCamp/.bashrc | 0 .freeCodeCamp/package-lock.json | 831 +++-- .freeCodeCamp/test/.cwd | 2 + .freeCodeCamp/test/.next_command | 32 + .gitignore | 0 .gitpod.yml | 0 .vscode/settings.json | 0 CHANGELOG.md | 31 - TUTORIAL.md | 2881 ---------------- coderoad.yaml | 1349 -------- tutorial.json | 5425 ------------------------------ 11 files changed, 596 insertions(+), 9955 deletions(-) mode change 100644 => 100755 .freeCodeCamp/.bashrc mode change 100644 => 100755 .freeCodeCamp/test/.cwd mode change 100644 => 100755 .freeCodeCamp/test/.next_command mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitpod.yml mode change 100644 => 100755 .vscode/settings.json delete mode 100644 CHANGELOG.md delete mode 100644 TUTORIAL.md delete mode 100644 coderoad.yaml delete mode 100644 tutorial.json diff --git a/.freeCodeCamp/.bashrc b/.freeCodeCamp/.bashrc old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/package-lock.json b/.freeCodeCamp/package-lock.json index ca841582a2..a1e2148084 100644 --- a/.freeCodeCamp/package-lock.json +++ b/.freeCodeCamp/package-lock.json @@ -1,205 +1,263 @@ { "name": "freecodecamp", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "ansi-colors": { + "packages": { + "": { + "name": "freecodecamp", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "mocha": "^7.2.0", + "mocha-tap-reporter": "^0.1.3", + "promisify-child-process": "^4.1.1", + "shell-quote": "^1.7.2" + } + }, + "node_modules/ansi-colors": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==" + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "engines": { + "node": ">=6" + } }, - "ansi-regex": { + "node_modules/ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "engines": { + "node": ">=4" + } }, - "ansi-styles": { + "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { + "dependencies": { "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "anymatch": { + "node_modules/anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "requires": { + "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "argparse": { + "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { + "dependencies": { "sprintf-js": "~1.0.2" } }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "binary-extensions": { + "node_modules/binary-extensions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "engines": { + "node": ">=8" + } }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "braces": { + "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { + "dependencies": { "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" } }, - "browser-stdout": { + "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, - "camelcase": { + "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } }, - "chalk": { + "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { + "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "chokidar": { + "node_modules/chokidar": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "requires": { + "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.2.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" } }, - "cliui": { + "node_modules/cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { + "dependencies": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "color-convert": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { + "dependencies": { "color-name": "1.1.3" } }, - "color-name": { + "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "debug": { + "node_modules/debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dependencies": { "ms": "^2.1.1" } }, - "decamelize": { + "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "engines": { + "node": ">=0.10.0" + } }, - "define-properties": { + "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { + "dependencies": { "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" } }, - "diff": { + "node_modules/diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "engines": { + "node": ">=0.3.1" + } }, - "emoji-regex": { + "node_modules/emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "es-abstract": { + "node_modules/es-abstract": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "requires": { + "dependencies": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", @@ -211,260 +269,386 @@ "object.assign": "^4.1.0", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "es-to-primitive": { + "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "requires": { + "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "escape-string-regexp": { + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } }, - "esprima": { + "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } }, - "fill-range": { + "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { + "dependencies": { "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "find-up": { + "node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { + "dependencies": { "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "flat": { + "node_modules/flat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "requires": { + "deprecated": "Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.", + "dependencies": { "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" } }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { + "node_modules/fsevents": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "optional": true + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, - "function-bind": { + "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "get-caller-file": { + "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } }, - "glob": { + "node_modules/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "requires": { + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" } }, - "glob-parent": { + "node_modules/glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "requires": { + "dependencies": { "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "growl": { + "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "engines": { + "node": ">=4.x" + } }, - "has": { + "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { + "dependencies": { "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" } }, - "has-flag": { + "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } }, - "has-symbols": { + "node_modules/has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "he": { + "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "is-binary-path": { + "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { + "dependencies": { "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "is-buffer": { + "node_modules/is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "engines": { + "node": ">=4" + } }, - "is-callable": { + "node_modules/is-callable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==" + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "is-date-object": { + "node_modules/is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "is-extglob": { + "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } }, - "is-fullwidth-code-point": { + "node_modules/is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "engines": { + "node": ">=4" + } }, - "is-glob": { + "node_modules/is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { + "dependencies": { "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "is-number": { + "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } }, - "is-regex": { + "node_modules/is-regex": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", - "requires": { + "dependencies": { "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-symbol": { + "node_modules/is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "requires": { + "dependencies": { "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "isexe": { + "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, - "js-yaml": { + "node_modules/js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "requires": { + "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "locate-path": { + "node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { + "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "lodash": { + "node_modules/lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, - "log-symbols": { + "node_modules/log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "requires": { + "dependencies": { "chalk": "^2.4.2" + }, + "engines": { + "node": ">=8" } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "minimist": { + "node_modules/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, - "mkdirp": { + "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { + "dependencies": { "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" } }, - "mocha": { + "node_modules/mocha": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "requires": { + "dependencies": { "ansi-colors": "3.2.3", "browser-stdout": "1.3.1", "chokidar": "3.3.0", @@ -489,279 +673,378 @@ "yargs": "13.3.2", "yargs-parser": "13.1.2", "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "mocha-tap-reporter": { + "node_modules/mocha-tap-reporter": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/mocha-tap-reporter/-/mocha-tap-reporter-0.1.3.tgz", "integrity": "sha1-Emy70vggZJXnKxWZFNOXuOoXoig=", - "requires": { + "dependencies": { "mocha": "*" } }, - "ms": { + "node_modules/ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, - "node-environment-flags": { + "node_modules/node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "requires": { + "dependencies": { "object.getownpropertydescriptors": "^2.0.3", "semver": "^5.7.0" } }, - "normalize-path": { + "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } }, - "object-inspect": { + "node_modules/object-inspect": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "object-keys": { + "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } }, - "object.assign": { + "node_modules/object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "requires": { + "dependencies": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", "has-symbols": "^1.0.0", "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" } }, - "object.getownpropertydescriptors": { + "node_modules/object.getownpropertydescriptors": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "requires": { + "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { + "dependencies": { "wrappy": "1" } }, - "p-limit": { + "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { + "dependencies": { "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "node_modules/p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { + "dependencies": { "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "p-try": { + "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } }, - "path-exists": { + "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } }, - "picomatch": { + "node_modules/picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "promisify-child-process": { + "node_modules/promisify-child-process": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/promisify-child-process/-/promisify-child-process-4.1.1.tgz", - "integrity": "sha512-/sRjHZwoXf1rJ+8s4oWjYjGRVKNK1DUnqfRC1Zek18pl0cN6k3yJ1cCbqd0tWNe4h0Gr+SY4vR42N33+T82WkA==" + "integrity": "sha512-/sRjHZwoXf1rJ+8s4oWjYjGRVKNK1DUnqfRC1Zek18pl0cN6k3yJ1cCbqd0tWNe4h0Gr+SY4vR42N33+T82WkA==", + "engines": { + "node": ">=8" + } }, - "readdirp": { + "node_modules/readdirp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "requires": { + "dependencies": { "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "engines": { + "node": ">=0.10.0" + } }, - "require-main-filename": { + "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, - "semver": { + "node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } }, - "set-blocking": { + "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "shell-quote": { + "node_modules/shell-quote": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "string-width": { + "node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { + "dependencies": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" } }, - "string.prototype.trimend": { + "node_modules/string.prototype.trimend": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "requires": { + "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "string.prototype.trimstart": { + "node_modules/string.prototype.trimstart": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "requires": { + "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { + "dependencies": { "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "engines": { + "node": ">=0.10.0" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "requires": { + "dependencies": { "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "to-regex-range": { + "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "which": { + "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "which-module": { + "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, - "wide-align": { + "node_modules/wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "requires": { + "dependencies": { "string-width": "^1.0.2 || 2" } }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { + "dependencies": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", "strip-ansi": "^5.0.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "wrappy": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "y18n": { + "node_modules/y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, - "yargs": { + "node_modules/yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "requires": { + "dependencies": { "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", @@ -772,50 +1055,60 @@ "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^13.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs-parser": { + } + }, + "node_modules/yargs-parser": { "version": "13.1.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "requires": { + "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, - "yargs-unparser": { + "node_modules/yargs-unparser": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "requires": { + "dependencies": { "flat": "^4.1.0", "lodash": "^4.17.15", "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" } } } diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd old mode 100644 new mode 100755 index e69de29bb2..b2f7080375 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -0,0 +1,2 @@ +/workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command old mode 100644 new mode 100755 index e69de29bb2..e5f3117b44 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -0,0 +1,32 @@ +builtin unset VSCODE_INJECTION +[ -z "$VSCODE_SHELL_INTEGRATION" ] +[ -n "${VSCODE_ENV_REPLACE:-}" ] +[ -n "${VSCODE_ENV_PREPEND:-}" ] +[ -n "${VSCODE_ENV_APPEND:-}" ] +__vsc_regex_environment="^CYGWIN*|MINGW*|MSYS*" +[[ "$(uname -s)" =~ $__vsc_regex_environment ]] +__vsc_is_windows=0 +__vsc_regex_histcontrol=".*(erasedups|ignoreboth|ignoredups).*" +[[ "$HISTCONTROL" =~ $__vsc_regex_histcontrol ]] +__vsc_history_verify=1 +builtin unset __vsc_regex_environment +builtin unset __vsc_regex_histcontrol +__vsc_initialized=0 +__vsc_original_PS1="$PS1" +__vsc_original_PS2="$PS2" +__vsc_custom_PS1="" +__vsc_custom_PS2="" +__vsc_in_command_execution="1" +__vsc_current_command="" +__vsc_nonce="$VSCODE_NONCE" +unset VSCODE_NONCE +__vsc_stable="$VSCODE_STABLE" +unset VSCODE_STABLE +[ "$__vsc_stable" = "0" ] +[[ -n "${bash_preexec_imported:-}" ]] +__vsc_dbg_trap="$(__vsc_get_trap DEBUG)" +[[ -z "$__vsc_dbg_trap" ]] +[[ "$__vsc_dbg_trap" != '__vsc_preexec "$_"' && "$__vsc_dbg_trap" != '__vsc_preexec_all "$_"' ]] +trap '__vsc_preexec_all "$_"' DEBUG +__vsc_original_prompt_command=${PROMPT_COMMAND:-} +echo hello bash diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitpod.yml b/.gitpod.yml old mode 100644 new mode 100755 diff --git a/.vscode/settings.json b/.vscode/settings.json old mode 100644 new mode 100755 diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 514c5dbbdd..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -## Contributing - -Please read the guidelines in the [contributing docs](https://contribute.freecodecamp.org/#/how-to-work-on-tutorials-that-use-coderoad) before contributing. Contributions to this project need to follow the correct workflow. - -# Change Log - -Whenever a new version is created, add the new branch name and the changes here - -## [v1.0.0] - -- Initial soft release with news article - -## [v1.0.1] - -- Fix regex in steps `950.1` and `970.1`, to match variable in double parenthesis not preceded by `$` -- Fix test description in step `990.1`: elif -> else - -## [v1.0.2] - -- Move startup commands to `setup.sh` -- Run `setup.sh` on continue and reset - -## [v1.0.3] - -- Restructure commits to use new style. Instead of loading a new test file, and commenting out the old one on each commit, this loads all the tests in the `INIT` commit and uses mocha settings to only run tests in a specific file. The commits now just change the test file that should run. -- There was an issue with the last commit not loading after using the reset button in a tutorial. I added a final commit at end that seems to have resolved it. -- Add instructions for [issue](https://github.com/freeCodeCamp/freeCodeCamp/issues/45683) - -## [v2.0.0] - -- Add Gitpod config diff --git a/TUTORIAL.md b/TUTORIAL.md deleted file mode 100644 index f8bef32cc8..0000000000 --- a/TUTORIAL.md +++ /dev/null @@ -1,2881 +0,0 @@ -# Learn Bash Scripting by Building Five Programs - -> Welcome to the Bash Scripting lessons! - -## 10. Start the Terminal - -### 10.1 - -**The first thing you need to do is start the terminal.** Do that by clicking the "hamburger" menu at the top left of the screen, going to the "terminal" section, and clicking "new terminal". Once you open a new one, type `echo hello bash` into the terminal and press enter. - -#### HINTS - -- Capitalization matters -- If the tests don't run automatically, "trash" all the terminals and try the instructions again - -## 20. touch questionnaire.sh - -### 20.1 - -You can run commands in the terminal or put them in a file to be run as a script. You will be making five small programs to learn some scripting. The first one will be a "questionnaire". Use the `touch` command to create `questionnaire.sh` in the `project` folder. - -#### HINTS - -- Type `touch questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 30. Add echo questionnaire - -### 30.1 - -To start, open the file in the main editor by clicking the filename in the left side panel. -Then, add the text `echo hello questionnaire` at the top of the file. - -#### HINTS - -- If the left side panel isn't visible, click the icon that looks like two pieces of paper -at the top left to open the panel. Then, click on your file to open it -- Add the suggested text to the `questionnaire.sh` file - -## 35. sh questionnaire.sh - -### 35.1 - -Your script has one command. Run it with `sh questionnaire.sh` to see what happens. `sh` stands for `shell`. - -#### HINTS - -- Type `sh questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 40. bash questionnaire.sh - -### 40.1 - -Using `sh` to run your script uses the `shell` interpreter. Run your script again with `bash questionnaire.sh` to use the `bash` interpreter. `bash` stands for `bourne-again shell`. - -#### HINTS - -- Type `bash questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 50. which bash - -### 50.1 - -The output was the same. There are many interpreters which may not give the output you expect. Find out where the `bash` interpreter is located by entering `which bash` in the terminal. - -#### HINTS - -- Type `which bash` in the terminal and press enter - -## 60. Add shebang - -### 60.1 - -That's the absolute path to the `bash` interpreter. You can tell your program to use it by placing a `shebang` at the very top of the file like this: `#!`. Add a `shebang` at the very top of your file, the one you want looks like this: `#!/bin/bash`. - -#### HINTS - -- Add `#!/bin/bash` at the top of your `questionnaire.sh` file - -## 70. ./questionnaire - -### 70.1 - -Now, instead of using `sh` or `bash` to run your script. You can run it by executing the file and it will default to bash. Execute your script with `./questionnaire.sh`. You will get a permission denied error. - -#### HINTS - -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 80. ls -l - -### 80.1 - -You should have got a permission denied message because you don't have permissions to execute the script. List what's in the `project` folder in long list format with `ls -l` to see the file permissions. - -#### HINTS - -- Type `ls -l` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 90. chmod +x questionnaire.sh - -### 90.1 - -Next to your file is `-rw-r--r--`. All but the first character (`-`) describe permissions different users have with the file. `r` means `read`, `w` means `write`, `x` means `execute`. I don't see an `x` anywhere, so nobody can execute it. Enter `chmod +x questionnaire.sh` in the terminal to give everyone executable permissions. - -#### HINTS - -- Type `chmod +x questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 100. ls -l - -### 100.1 - -List what's in the folder again with `ls -l` to see the new permissions. - -#### HINTS - -- Type `ls -l` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 110. ./questionnaire - -### 110.1 - -The `x` was added by each type of user to denote that anyone can execute the file. Run your file again by executing it with `./questionnaire.sh`. - -#### HINTS - -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 140. Add ls -l - -### 140.1 - -Now it works. In your script, you can add any commands that you would be able to enter in the terminal. Test this by adding the `ls -l` command below your other command. - -#### HINTS - -- Add `ls -l` at the bottom of your `questionnaire.sh` file - -## 150. ./questionnaire - -### 150.1 - -Run the script by executing it again. - -#### HINTS - -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 160. Delete all - shebang - -### 160.1 - -Your script printed the result of the two commands as if you entered them in the terminal. Delete everything but the `shebang` from your file so you can start making the questionnaire. - -#### HINTS - -- Only `#!/bin/bash` should remain in your `questionnaire.sh` file - -## 170. Add QUESTION1 variable - -### 170.1 - -Bash has variables, functions, and other things you might be familiar with. You can create a variable with `VARIABLE_NAME=VALUE`. There cannot be any spaces around the equal (`=`) sign. If a variable has any spaces in it, place double quotes around it. Create a variable named `QUESTION1` and set it's value to `"What's your name?"`. - -#### HINTS - -- Add `QUESTION1="What's your name?"` at the bottom of your `questionnaire.sh` file - -## 180. Add echo $QUESTION1 - -### 180.1 - -To use a variable, place `$` in front of it like this: `$VARIABLE_NAME`. Shell scripts run from top to bottom, so you can only use variable below where it's created. Use `echo` to print your variable. - -#### HINTS - -- Add `echo $QUESTION1` at the bottom of your `questionnaire.sh` file - -## 190. ./questionnaire - -### 190.1 - -Run the file like you did before to see if it worked. - -#### HINTS - -- Run your file by executing it -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 200. Add read NAME - -### 200.1 - -The question was printed. Next, you want to be able to accept input from a user. You can do that with `read` like this: `read VARIABLE_NAME`. This will get user input and store it into a new variable. After you print the question, use `read` to get input and store it in a variable named `NAME`. - -#### HINTS - -- Add `read NAME` at the bottom of your `questionnaire.sh` file - -## 210. Add echo Hello $NAME - -### 210.1 - -At the bottom of your script, use `echo` to print `Hello .` to the terminal. - -#### HINTS - -- You can use your `NAME` variable like this: `$NAME` -- Use your `$NAME` variable in place of `` -- Don't forget the period -- Add `echo Hello $NAME.` at the bottom of your script - -## 220. ./questionnaire - -### 220.1 - -Run the file again. Type your name and press enter after it asks for it. - -#### HINTS - -- Run your file by executing it -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there -- You can press `ctrl+c` to close the program - -## 230. Add QUESTION2 variable - -### 230.1 - -Right below your first variable, create another one named `QUESTION2`. Set the value to, `Where are you from?`. Make sure to put it in double quotes. - -#### HINTS - -- Here's an example: `VARIABLE="value"` -- Add `QUESTION2="Where are you from?"` to your script - -## 240. Add echo $QUESTION2 - -### 240.1 - -After your `read` command, use your new variable to print the next question. - -#### HINTS - -- Use `echo` to print the variable -- Add `echo $QUESTION2` below your `read` command - -## 250. Add read LOCATION - -### 250.1 - -Below where the second question is printed, use `read` to get input from the user into a variable named `LOCATION`. - -#### HINTS - -- Here's an example `read VARIABLE_NAME` -- Add `read LOCATION` to your script below `echo $QUESTION2` - -## 260. Add echo Hello $NAME from $LOCATION - -### 260.1 - -Change the existing response to `Hello from .`. - -#### HINTS - -- Use your two variables in place of `` and ` ` -- The command is `echo`, the flag is `--help` -- Type `echo --help` in the terminal and press enter - -## 310. man echo - -### 310.1 - -That didn't work as I hoped. Another way to find information about a command is with `man`. It stands for `manual` and you can use it like this: `man `. See if there's a manual for `echo`. - -#### HINTS - -- Type `man echo` in the terminal and press enter -- Press enter until you have seen the whole menu - -## 320. Add echo -e \n~~ Questionnaire ~~\n - -### 320.1 - -At the top of the menu, the `-e` option looks promising. And the `\n` below it says `new line`. You should take a look at those. In your script, change the title to `echo -e \n~~ Questionnaire ~~\n` to see if that prints the empty lines. - -#### HINTS - -- Change the suggested line to `echo -e \n~~ Questionnaire ~~\n` - -## 323. ./questionnaire - -### 323.1 - -Run it to see if it worked. You can press `ctrl+c` to close the program after it starts if you don't want to enter values. - -#### HINTS - -- Run your file by executing it -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- You can press `ctrl+c` to close the program - -## 326. Change to echo -e "\n~~ Questionnaire ~~\n" - -### 326.1 - -It didn't print the empty lines. `echo` will only print empty lines if the value is enclosed in quotes. Place double quotes around the title that gets printed to see if it works. - -#### HINTS - -- Change the suggested line to `echo -e "\n~~ Questionnaire ~~\n"` - -## 330. ./questionnaire - -### 330.1 - -Run your script again to see if that fixed it. - -#### HINTS - -- Run your file by executing it -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- You can press `ctrl+c` to close the program - -## 340. Add QUESTION3 variable - -### 340.1 - -Now it's working :smile: Create a `QUESTION3` variable next to the other two, set it's value to `"What's your favorite coding website?"` - -#### HINTS - -- Add `QUESTION3="What's your favorite coding website?"` to your `questionnaire.sh` file -- Add it by the other two variables - -## 345. echo QUESTION3 variable - -### 345.1 - -Use `echo` to print the third question after you `read` the `LOCATION`. - -#### HINTS - -- Add `echo $QUESTION3` below the `read LOCATION` -- Add it to your `questionnaire.sh` file - -## 350. read WEBSITE - -### 350.1 - -After the question you just printed, add code to read input into a variable named `WEBSITE`. - -#### HINTS - -- Add `read WEBSITE` below the `echo $QUESTION3` - -## 360. echo final sentence - -### 360.1 - -Change the `echo` command of the response to print this sentence instead: `Hello from . I learned that your favorite coding website is !`. - -#### HINTS - -- Replace the `echo Hello $NAME from $LOCATION.` with the suggested sentence -- Use your three variables in place of ``, ``, and `` -- The command should look like this: `echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE!` - -## 363. ./questionnaire - -### 363.1 - -Run the script and enter values when the program is waiting. Let's see the final output. - -#### HINTS - -- Run your file by executing it -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 366. Add line breaks around final sentence - -### 366.1 - -One last thing. Change that final response to print an empty line at the beginning of the sentence. - -#### HINTS - -- Use `echo` with the `-e` flag and a new line (`\n`) character like you did for the title -- Don't forget to put the response in double quotes so it prints the empty line -- Here's an example: `echo -e "\n"` -- Only add a new line at the beginning of the response, not the end -- The final command should look like this: `echo "\nHello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE!"` - -## 370. ./questionnaire - -### 370.1 - -Run it one last time and enter values when it asks to see if you like how it looks. - -#### HINTS - -- Run your file by executing it -- Type `./questionnaire.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 380. touch countdown.sh - -### 380.1 - -It looks good. I think you are done with that script for now. The next program will be countdown timer. Use the `touch` command to create a new file named `countdown.sh` in your `project` folder. - -#### HINTS - -- Type `touch countdown.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 390. chmod +x countdown.sh - -### 390.1 - -Give your file executable permissions so you can run it like the other one. It's the `chmod` command with the `+x` flag. - -#### HINTS - -- Here's an example `chmod ` -- The value for permissions you want to use is `+x` -- You previously used `chmod +x questionnaire.sh` -- Type `chmod +x countdown.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 400. Add shebang - -### 400.1 - -You want to use the `bash` interpreter again. Add a `shebang` at the top of your new file to denote that. - -#### HINTS - -- A `shebang` looks like this: `#!` -- Enter `which bash` in the terminal to see the path to `bash` -- Look at the `shebang` in your first script to get the syntax -- It should look like this: `#!/bin/bash` -- Add `#!/bin/bash` at the top of your `countdown.sh` file - -## 410. Add comment - -### 410.1 - -Comments in `bash` look like this: `# `. Add a comment below the `shebang` that says `Program that counts down to zero from a given argument` so people know what it does. Note that the `shebang` is a special case and is not treated like a comment. - -#### HINTS - -- Add `# Program that counts down to zero from a given argument` to your `countdown.sh` file - -## 420. Add echo $* - -### 420.1 - -Programs can take arguments. You can access them a few different ways with `$`. Add `echo $*` in your script to print all arguments passed to it. - -#### HINTS - -- Add `echo $*` at the bottom of the `countdown.sh` file - -## 425. ./countdown.sh - -### 425.1 - -Execute your script with `./countdown.sh`. - -#### HINTS - -- Type `./countdown.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 430. ./countdown.sh arg1 arg2 arg3 - -### 430.1 - -Nothing was printed. Run your script again, but this time add three arguments to the command; `arg1`, `arg2`, and `arg3`. Place them after the command with a space before each one. - -#### HINTS - -- Type `./countdown.sh arg1 arg2 arg3` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 440. Change to echo $1 - -### 440.1 - -`$*` printed all the arguments passed to your script. To access any one of them, use `$`. `arg2` could have been accessed with `$2`. Change your script to `echo` the first argument instead of all the arguments. - -#### HINTS - -- Try running your script with an argument to make sure it’s giving the expected output -- Use `echo $1` to print the second argument -- Change `echo $*` to `echo $1` in your `countdown.sh` file - -## 450. ./countdown.sh arg1 arg2 arg3 - -### 450.1 - -Run your file with `./countdown.sh arg1 arg2 arg3` again. - -#### HINTS - -- Type `./countdown.sh arg1 arg2 arg3` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 460. help - -### 460.1 - -Now it just prints the first argument. Your program will accept an argument to count down from. You will test it with an `if` statement to make sure it's a positive integer. I wonder what that syntax would look like. Type `help` in the terminal to see if you can find anything. - -#### HINTS - -- Type `help` in the terminal and press enter - -## 470. man if - -### 470.1 - -This is a list of built-in commands. You should look over it, some of them may look familiar. I see `echo` in there. Another one is `if`. See if you can find out more about it by checking its `man` page. - -#### HINTS - -- Here's an example: `man ` -- Type `man if` in the terminal and press enter - -## 480. help if - -### 480.1 - -I guess there isn't a `man` page for it. At the top of the `help` screen, I noticed you can use `help ` to find out more. Yet another way to find out about a command :disappointed_relieved: See if you can find out more about `if` with that method. - -#### HINTS - -- Here's an example `help ` -- Type `help if` in the terminal and press enter - -## 490. Add if arg1 print true - -### 490.1 - -The syntax is at the top, not all of it is required. Here's another example: - -```sh -if [[ CONDITION ]] -then - STATEMENTS -fi -``` - -Remove the `echo $1` in your script and add an `if` condition that checks `if [[ $1 == arg1 ]]`. In its `then` area, use `echo` to print `true` to the screen. There must be spaces on the inside of the brackets (`[[ ... ]]`) and around the operator (`==`). - -#### HINTS - -- Make sure to remove the `echo $1` -- Add the following to your `countdown.sh` file: -```sh -if [[ $1 == arg1 ]] -then - echo true -fi -``` - -## 500. ./countdown arg1 - -### 500.1 - -Notice that the end of the syntax is `fi` (`if` backwards). It should print `true` if you pass `arg1` to your script now. Run the script with `arg1` as the only argument. - -#### HINTS - -- Type `./countdown.sh arg1` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 505. ./countdown !arg1 - -### 505.1 - -The `if` condition worked, it printed `true`. Run it again with anything except `arg1` as the first argument. - -#### HINTS - -- Type `./countdown.sh arg2` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 510. Add else print false - -### 510.1 - -Nothing was printed. One of the optional parts of `if` was an `else` area. You can use it like this: - -```sh -if [[ CONDITION ]] -then - STATEMENTS -else - STATEMENTS -fi -``` - -Add an `else` to your existing `if` condition. Use `echo` to print `false` if the condition fails. - -#### HINTS - -- Your `if` should look like this: -```sh -if [[ $1 == arg1 ]] -then - echo true -else - echo false -fi -``` - -## 520. ./countdown !arg1 - -### 520.1 - -Run the script again and use anything except `arg1` as the only argument. - -#### HINTS - -- Type `./countdown.sh !arg1` in the terminal and press enter -- Make sure you are in the `project` folder first -- Enter `cd ~/project` in the terminal to get to the project folder if you aren't there - -## 530. Change if condition -lt 5 - -### 530.1 - -Now it printed `false`. Your program is expecting an integer to count down from as its argument. You can compare integers inside the brackets (`[[ ... ]]`) of your `if` with `-eq` (equal), `-ne` (not equal), `-lt` (less than), `-le` (less than or equal), `-gt` (greater than), `-ge` (greater than or equal). Change your `if` condition to check if your first argument is less than `5`. - -#### HINTS - -- Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-lt`) -- Your `if` condition should look like this: `[[ $1 -lt 5 ]]` -- The whole `if` should look like this: -```sh -if [[ $1 -lt 5 ]] -then - echo true -else - echo false -fi -``` - -## 540. ./countdown 4 - -### 540.1 - -Run the script again and use `4` as a first argument to make sure it's working. - -#### HINTS - -- Type `./countdown.sh 4` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 542. ./countdown 5 - -### 542.1 - -It printed `true` since your argument was less than `5`. Run it again with `5` as the argument. - -#### HINTS - -- Type `./countdown.sh 5` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 544. help - -### 544.1 - -As expected, that printed `false`. Take a look at that `help` menu again. I want to see if we can find out more about how these expressions work. - -#### HINTS - -- Type `help` in the terminal and press enter - -## 546. help [[ expression ]] - -### 546.1 - -Near the top left, it says `[[ expression ]]`. Those look like the double brackets you are using. See if you can get more info about that with the `help` command like you did with `help if`. - -#### HINTS - -- Here's an example: `help ` -- Type `help [[ expression ]]` or `help [[` in the terminal and press enter - -## 548. help test - -### 548.1 - -It might not be a bad idea to read that. Looks like you can use some, probably familiar, things like `!`, `&&`, and `||` to compare multiple expressions. There's also `==` and `!=` operators for an individual expression. It says something about the `test` built-in command. See if you can bring up the `help` menu for that. - -#### HINTS - -- View the `help` menu of the suggested command like you did for the `help if` -- Here's an example: `help ` -- Type `help test` in the terminal and press enter - -## 550. Change if to [[ $1 -le 5 ]] - -### 550.1 - -That's what I was looking for. At the top are some file operators. There's some string and other operators as well. You should take a look at them. Near the bottom, are the arithmetic operators you used with your `if` condition. Change the condition in your script to check if the first argument is less than or equal to `5`. - -#### HINTS - -- The `if` condition should look like this: `[[ $1 -le 5 ]]` -- Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-le`) -- It's the `if` in your `countdown.sh` file - -## 552. ./countdown 5 - -### 552.1 - -Run the script and use `5` as a first argument again. - -#### HINTS - -- Type `./countdown.sh 5` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 554. [[ 4 -le 5 ]] - -### 554.1 - -Now it prints `true`. Remember I said any command can run in the terminal or a script. Try running an expression right in the terminal by entering `[[ 4 -le 5 ]]` in it. - -#### HINTS - -- Enter the suggested expression in the terminal -- Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-le`) -- Type `[[ 4 -le 5 ]]` in the terminal and press enter - -## 556. echo $? - -### 556.1 - -Nothing happened? Each command has an exit status that can be accessed with `$?`. View the exit status of the **last command** with `echo $?`. - -#### HINTS - -- Type `echo $?` in the terminal and press enter -- Your second to last command should be `[[ 4 -le 5 ]]`. So enter that before `echo $?` - -## 558. [[ 4 -ge 5 ]] - -### 558.1 - -The exit status of `0` means it was true, `4` is indeed less or equal to `5`. Try it again with `[[ 4 -ge 5 ]]`. - -#### HINTS - -- Enter the suggested expression in the terminal -- Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-ge`) -- Type `[[ 4 -ge 5 ]]` in the terminal and press enter - -## 560. echo $? - -### 560.1 - -Use `echo` to view the exit status of the command you just entered. - -#### HINTS - -- Type `echo $?` in the terminal and press enter -- Your second to last command should be `[[ 4 -ge 5 ]]`. So enter that right before `echo $?` - -## 562. [[ 4 -ge 5 ]]; echo $? - -### 562.1 - -It printed `1` this time for false. You can separate commands on a single line with `;`. Enter your last two commands on one line like this: `[[ 4 -ge 5 ]]; echo $?`. It will run the expression, then print the exit status of it since it was the last command. - -#### HINTS - -- Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-ge`) -- Type `[[ 4 -ge 5 ]]; echo $?` in the terminal and press enter - -## 564. [[ 10 -ne 5 ]]; echo $? - -### 564.1 - -It's still false. Using the same syntax of `[[ ... ]]; echo$?`, check if `10` is not equal to `5` and print the exit status of the expression on one line. - -#### HINTS - -- Check the `help test` menu to find the `not equal` operator -- It's the `-ne` operator -- You previously used `[[ 4 -ge 5 ]]; echo $?` -- Make sure there's spaces inside the brackets and around the operator -- Type `[[ 10 -ne 5 ]]; echo $?` in the terminal and press enter - -## 566. bad_command; echo $? - -### 566.1 - -You can think of an exit status of `0` as true. But it means that the command had zero errors. All commands have an exit status. Using the same syntax, enter `bad_command;` and check its exit status on a single line. - -#### HINTS - -- The syntax looks like this: `; echo $?` -- You previously used `[[ 10 -ne 5 ]]; echo $?` -- Type `bad_command; echo $?` in the terminal and press enter - -## 568. ls; echo $? - -### 568.1 - -`command not found`, with an exit status of `127`. Anything but `0` means there was an error with the command. `bad_command` didn't exist. Try it again with `ls`. - -#### HINTS - -- Use the same syntax you have been using -- Here's an example `; echo $?` -- You previously used `bad_command; echo $?` -- Type `ls; echo $?` in the terminal and press enter - -## 570. ls -y; echo $? - -### 570.1 - -The command executed as expected and there were zero errors. So it gave you an exit status of `0`. Try it again with `ls -y`. - -#### HINTS - -- Use the same syntax you have been using -- Here's an example: `; echo $?` -- You previously used `ls; echo $?` -- Type `ls -y; echo $?` in the terminal and press enter - -## 572. help test - -### 572.1 - -The `-y` flag doesn't work with `ls` so it gave you an exit status other than `0`, meaning that the command was unsuccessful. View the `help` menu of the `test` command again, I want to see what else is in that list. - -#### HINTS - -- Here's an example: `help ` -- Type `help test` in the terminal and press enter - -## 574. [[ -a countdown.sh ]]; echo $? - -### 574.1 - -You tried a few of the arithmetic operators, those work for integers. Try one of the file operators. The first one on the list checks if a file exists. Type `[[ -a countdown.sh ]]; echo $?` in the terminal to see if your file exists. - -#### HINTS - -- Enter the suggested commands in the terminal -- Type `[[ -a countdown.sh ]]; echo $?` in the terminal and press enter -- Don't forget the spaces inside the brackets -- Make sure you are in the `project` folder first - -## 575. [[ -a bad_file.txt ]]; echo $? - -### 575.1 - -The file must exist. It's checking the folder the command is entered from. Try it again with `bad_file.txt`. - -#### HINTS - -- Use the same syntax you have been using -- Here's an example: `; echo $?` -- You previously used `[[ -a countdown.sh ]]; echo $?` -- Type `[[ -a bad_file.txt ]]; echo $?` in the terminal and press enter -- Don't forget the spaces inside the brackets - -## 576. [[ -x countdown.sh ]]; echo $? - -### 576.1 - -`bad_file.txt` doesn't exist. I think you're getting the hang of this. Using the same syntax, check if you have permissions to execute your `countdown.sh` file. You may want to look at that menu again. - -#### HINTS - -- View the `help test` menu to find the file operator for checking if a file is executable by you -- It's the `-x` operator -- The syntax you want is `[[ ... ]]; echo $?` to see if the condition is true -- Don't forget the spaces inside the brackets -- Type `[[ -x countdown.sh ]]; echo $?` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 582. help [[ expression ]] - -### 582.1 - -You played around with a number of the expressions. View the `help [[ expression ]]` menu again that you looked at before to see a few more options. You can view the menu with just `help [[`. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `help [[ expression ]]` or `help [[` in the terminal and press enter - -## 584. [[ -x countdown.sh && 5 -le 4 ]]; echo $? - -### 584.1 - -As I mentioned before, you can test multiple expressions with `&&` and `||`. Enter `[[ -x countdown.sh && 5 -le 4 ]]; echo $?` in the terminal to test the file is executable by you **and** five is less than or equal to four. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `[[ -x countdown.sh && 5 -le 4 ]]; echo $?` in the terminal and press enter -- Make sure there's spaces around the brackets and all the operators - -## 586. [[ -x countdown.sh || 5 -le 4 ]]; echo $? - -### 586.1 - -Both conditions weren't true, so the exit status was `1` for `false`. Try testing the same two conditions with the `or` operator. - -#### HINTS - -- Modify this `[[ -x countdown.sh && 5 -le 4 ]]; echo $?` with the suggestion and enter it in the terminal -- Use the `or` operator from the `help [[ expression ]]` menu -- The `or` operator is `||` -- Type `[[ -x countdown.sh || 5 -le 4 ]]; echo $?` in the terminal and press enter -- Make sure there's spaces around the brackets and all the operators - -## 588. Change if to [[ $1 -gt 0 ]] - -### 588.1 - -One of the conditions was true so it printed `0`. I think that's enough of a detour. Back in your script, change the `if` condition to check if the first argument is **greater than zero** so you can be sure it's something you can count down from. - -#### HINTS - -- Use the `-gt` operator in your `if` condition -- The `if` condition should look like this: `[[ $1 -gt 0 ]]` -- It's in the `countdown.sh` file - -## 590. Change if !# message - -### 590.1 - -The condition you added checks if a positive integer was passed as an argument to the script and executes the `then` area. Change the existing `echo` command to print `Include a positive integer as the first argument.` if a positive integer is not used. - -#### HINTS - -- The `else` area should look like this: `echo Include a positive integer as the first argument.` -- The whole `if` condition should look like this: -```sh -if [[ $1 -gt 0 ]] -then - echo true -else - echo Include a positive integer as the first argument. -fi -``` - -## 600. ./countdown 1 - -### 600.1 - -Run your script and use `1` as a first argument to make sure the condition is working. - -#### HINTS - -- Type `./countdown.sh 1` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 610. ./countdown 0 - -### 610.1 - -Run it again and use anything but a positive integer as the only argument. - -#### HINTS - -- Type `./countdown.sh 0` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 615. help - -### 615.1 - -Looks like your `if` condition is working. Next, you want to loop over the argument and count down to zero from it. Check the `help` menu to see if there's any commands for this. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `help` in the terminal and press enter - -## 620. Add for loop for countdown - -### 620.1 - -There's two `for` loops in there, you want the second one. Here's an example: - -```sh -for (( i = 10; i > 0; i-- )) -do - echo $i -done -``` - -The above creates a variable (`i = 10`), then prints it, subtracts one, and repeats until `i` is not greater than `0`. So it prints `10` through `1`. In the `then` area of your condition, replace the `echo` with a `for` loop that prints from the argument (`$1`) to `1`. - -#### HINTS - -- Set the variable to the value of your argument (`$1`) initially -- Use the same syntax as the example except change the `10` to `$1` -- Don't include any extra commands in the `then` area -- Your `then` area should look like this: -```sh -for (( i = $1; i > 0; i-- )) -do - echo $i -done -``` -- The whole `if` condition should look like this: -```sh -if [[ $1 -gt 0 ]] -then - for (( i = $1; i > 0; i-- )) - do - echo $i - done -else - echo Include a positive integer as the first argument. -fi -``` - -## 630. ./countdown 10 - -### 630.1 - -Run your script and use `10` as the first argument. - -#### HINTS - -- Type `./countdown.sh 10` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 640. help - -### 640.1 - -It works :smile: But I want it to pause for one second between each number. Check the `help` menu again to see if there's any commands that might help. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `help` in the terminal and press enter - -## 650. ls / - -### 650.1 - -I'm not seeing the command I was hoping to. These are the built-in commands, where are the rest? Type `ls /` to look around. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `ls /` in the terminal and press enter - -## 660. ls /bin - -### 660.1 - -The `/` listed what's in the root of the file system. I see a `bin` folder, `bin` stands for `binary`. View what's in it with `ls /bin`. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `ls /bin` in the terminal and press enter - -## 670. man sleep - -### 670.1 - -These are some non built-in commands. There's quite a few that should look familiar. One is `bash`, that's the one you used for the `shebang` in your scripts. I see one called `sleep`. View the manual of it. - -#### HINTS - -- View a manual with the `man` command -- Here's an example: `man ` -- Enter `man sleep` in the terminal -- Press enter until you have seen the whole menu - -## 675. sleep 3 - -### 675.1 - -At the top, it says you can pause execution for a number of seconds. Try it out by entering `sleep 3` in the terminal. - -#### HINTS - -- Enter the suggested command in the terminal -- Enter `sleep 3` in the terminal - -## 680. Add sleep to for loop - -### 680.1 - -That should work. In your `for` loop, use `sleep` to make the script pause for `1` second after each number is printed. - -#### HINTS - -- Add the suggestion to the `for` loop in your `countdown.sh` file -- Add `sleep 1` after you print `i` in your `for` loop - -## 690. ./countdown 3 - -### 690.1 - -Run your script and use `3` as the first argument. - -#### HINTS - -- Type `./countdown.sh 3` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 692. Change to >= - -### 692.1 - -Awesome. Except it should print `0` instead of stopping at `1`. Change the condition in your for loop so that it checks for `i >= 0`. - -#### HINTS - -- Your `for` loop should look like this: -```sh -for (( i = $1; i >= 0; i-- )) -do - echo $i - sleep 1 -done -``` -- The whole `if` condition should look like this: -```sh -if [[ $1 -gt 0 ]] -then - for (( i = $1; i >= 0; i-- )) - do - echo $i - sleep 1 - done -else - echo Include a positive integer as the first argument. -fi -``` - -## 694. ./countdown 3 - -### 694.1 - -Run your script with `3` as the argument again. - -#### HINTS - -- Type `./countdown.sh 3` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 696. Add echo -e "title" - -### 696.1 - -Excellent. I want it to display a title like the other script. Make it so that it prints `~~ Countdown Timer ~~` before anything else. Include a new line before and after it like you did for the other title. - -#### HINTS - -- Use the `echo` command with the `-e` flag and the new line (`\n`) character -- Make sure to place the message in double quotes -- Here's an example: `echo -e "\n\n"` -- Add `echo -e "\n~~ Countdown Timer ~~\n"` to the `countdown.sh` file after the comment - -## 698. ./countdown 1 - -### 698.1 - -Run your script and use `1` as the first argument again to see the title. - -#### HINTS - -- Type `./countdown.sh 1` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 700. Add Multiline comment - -### 700.1 - -This is fun. You can create a multiline comment like this: - -```sh -: ' - comment here - more comment here -' -``` - -Comment out your `for` loop with a multiline comment. I want to try and do this with a `while` loop. - -#### HINTS - -- Comment out the `for` loop in your `countdown.sh` file with a multiline comment -- Make sure there's a space between the `:` and `'` -- Your `for` loop should look like this: -```sh -: ' -for (( i = $1; i >= 0; i-- )) -do - echo $i - sleep 1 -done -' -``` - -## 710. help while - -### 710.1 - -View the `help` menu for the `while` command to see if you can find anything. - -#### HINTS - -- Here's an example: `help ` -- Enter `help while` in the terminal - -## 730. Add I variable - -### 730.1 - -It shows the syntax. First, below your comment, create a variable named `I` that is set to the value of your first argument. It will start there, then on each iteration of the `while` loop you can subtract `1` from it until it reaches `0`. - -#### HINTS - -- Add `I=$1` in the `then` area of your `if` statements below the multi-line comment -- The `then` area should look like this: -```sh -: ' -for (( i = $1; i >= 0; i-- )) -do - echo $i - sleep 1 -done -' -I=$1 -``` - -## 740. Add while loop - -### 740.1 - -The menu showed that you can make a `while` loop like this: - -```sh -while [[ CONDITION ]] -do - STATEMENTS -done -``` - -Add a `while` loop below the `I` variable you made. The condition should be `$I -ge 0` and you should `echo` the `I` variable in the `do` statements. - -#### HINTS - -- Your `while` loop should look like this: -```sh -while [[ $I -ge 0 ]] -do - echo $I -done -``` - -## 750. Add (( I-- )) - -### 750.1 - -`I` never changes here, so you would have an infinite loop. You can subtract one from `I` with double parenthesis (`((...))`) and the `--` operator. In your while loop, add `(( I-- ))` after you `echo $I` to subtract one from `I` on each pass. - -#### HINTS - -- Your `while` loop should look like this: -```sh -while [[ $I -ge 0 ]] -do - echo $I - (( I-- )) -done -``` - -## 760. Add sleep 1 - -### 760.1 - -The last thing to do is to add the `sleep` again. In your `while` loop, add the code to make it `sleep` for `1` second. Add the code after the `(( I-- ))`. - -#### HINTS - -- Use the same `sleep 1` you used in the `for` loop -- Your `while` loop should look like this: -```sh -while [[ $I -ge 0 ]] -do - echo $I - (( I-- )) - sleep 1 -done -``` - -## 770. ./countdown.sh 5 - -### 770.1 - -Run the script and use 5 as the first argument. - -#### HINTS - -- Type `./countdown.sh 5` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 780. touch bingo.sh - -### 780.1 - -I think the countdown timer is finished. Feel free to try it with some other arguments. The next one is a bingo number generator. Use `touch` to create `bingo.sh` in the same folder as the others. - -#### HINTS - -- Type `touch bingo.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 790. chmod +x bingo.sh - -### 790.1 - -Give your file executable permissions like you did for the other two. - -#### HINTS - -- Use the `chmod` command with the `+x` flag -- Here's an example `chmod ` -- You previously used `chmod +x countdown.sh` -- Type `chmod +x bingo.sh` in the terminal and press enter - -## 800. Add shebang - -### 800.1 - -Add a `shebang` at the top of your new script. It should use `bash` again like other two. - -#### HINTS - -- A `shebang` looks like this: `#!` -- Enter `which bash` in the terminal to see the path to `bash` -- Look at the `shebang` in one of your other scripts to get the syntax -- It should look like this: `#!/bin/bash` -- Add `#!/bin/bash` at the top of your `bingo.sh` file - -## 810. Add comment - -### 810.1 - -Add a comment below the `shebang` that says, `Bingo Number Generator`. - -#### HINTS - -- Comments look like this: `# ` -- Add `#Bingo Number Generator` below the `shebang` -- Capitalization matters - -## 815. Add echo -e "title" - -### 815.1 - -Before I forget, use a single `echo` command to print a title for this program. It should say `~~ Bingo Number Generator ~~` with an empty line before and after it. - -#### HINTS - -- Use the `echo` command with the `-e` flag and the new line (`\n`) character -- Don't forget the double quotes when using a new line character -- Take a look at one of the title's from a previous file for a hint -- Here's an example: `echo -e "\n\n"` -- You previously used `echo -e "\n~~ Countdown Timer ~~\n"` -- Add `echo -e "\n~~ Bingo Number Generator ~~\n"` below the comment of your `bingo.sh` file - -## 817. Add NUMBER=5 variable - -### 817.1 - -In your script, create a `NUMBER` variable that equals `5`. - -#### HINTS - -- Here's an example: `VARIABLE_NAME=VALUE` -- Add `NUMBER=5` to the bottom of your `bingo.sh` file - -## 818. echo $NUMBER - -### 818.1 - -Below your new variable, use `echo` to print it to the screen. - -#### HINTS - -- Here's an example: `echo $` -- Use `NUMBER` in place of `` -- Add `echo $NUMBER` at the bottom of your `bingo.sh` file - -## 819. ./bingo.sh - -### 819.1 - -Run the script by executing it. - -#### HINTS - -- Type `./bingo.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 820. printenv - -### 820.1 - -The numbers in bingo go up to 75, each number has a letter from the word `bingo` associated with it. You will need to randomly generate a number between 1 and 75. Bash may have something that can help you here. A shell comes with environment variables. View them by entering `printenv` in the terminal. - -#### HINTS - -- Type `printenv` in the terminal and press enter - -## 822. echo $LANG - -### 822.1 - -These are all environment variables, they are predefined and loaded with each shell. Most of them aren’t very relevant, but it’s nice to know they’re there. One of them is `LANG`. Use `echo` to print it in the terminal. - -#### HINTS - -- Here's an example: `echo $` -- Type `echo $LANG` in the terminal and press enter - -## 824. declare -p - -### 824.1 - -View all variables in the shell with `declare -p`. `-p` stands for `print` - -#### HINTS - -- Type `declare -p` in the terminal and press enter - -## 826. echo $RANDOM - -### 826.1 - -This list includes all the environment variables, and any others that may have been created in the current shell. There's one named `RANDOM`. Use `echo` to print it in the terminal. - -#### HINTS - -- Here's an example: `echo $` -- Type `echo $RANDOM` in the terminal and press enter - -## 828. Change to NUMBER=$RANDOM - -### 828.1 - -Back in your script, use the `RANDOM` variable to set `NUMBER` to a random number instead of `5`. - -#### HINTS - -- Change `NUMBER=5` to `NUMBER=$RANDOM` - -## 830. ./bingo.sh - -### 830.1 - -Run the script a few times in a row to make sure it's working. - -#### HINTS - -- Type `./bingo.sh` in the terminal and press enter two times in a row -- Make sure you are in the `project` folder first - -## 835. Change to NUMBER=$RANDOM%75 - -### 835.1 - -The `RANDOM` variable will generate a random number between 0 and 32767. You can use the `modulus` operator to make it in the range you want. In your script, change the `NUMBER` variable to `$RANDOM%75`. - -#### HINTS - -- Change `NUMBER=$RANDOM` to `NUMBER=$RANDOM%75` - -## 840. ./bingo.sh - -### 840.1 - -Run the script again. - -#### HINTS - -- Type `./bingo.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 881. I=0 - -### 881.1 - -Bash sees everything as a string so it just printed the `%75` part literally. In the terminal, create an `I` variable equal to `0` (zero), so you can play with it and figure out how to do some calculations. - -#### HINTS - -- Type `I=0` in the terminal and press enter - -## 884. echo $I - -### 884.1 - -In the terminal, use `echo` to print your new variable. - -#### HINTS - -- Here's an example: `echo $` -- Type `echo $I` in the terminal and press enter - -## 887. (( I++ )) - -### 887.1 - -I noticed that you used double parenthesis in the `while` loop of your countdown timer to subtract one from `I`. Type `(( I++ ))` in the terminal to see if anything happens. - -#### HINTS - -- Type `(( I++ ))` in the terminal and press enter - -## 890. echo $I - -### 890.1 - -There was no output. Use `echo` to print `I` in the terminal again. - -#### HINTS - -- Type `echo $I` in the terminal and press enter - -## 891. help let - -### 891.1 - -The double parenthesis performed the calculation, changing the value of `I` from `0` to `1`. Enter `help let` in the terminal to see the operators you can use with the double parenthesis. - -#### HINTS - -- Type `help let` in the terminal and press enter - -## 893. (( I += 10 )) - -### 893.1 - -You used several of these now, including in the `for` loop from the countdown timer. Enter `(( I += 10 ))` in the terminal to increment `I` by `10`. Note that you don't need to prepend variables with `$` inside these parenthesis. - -#### HINTS - -- Type `(( I += 10 ))` in the terminal and press enter - -## 896. echo $I - -### 896.1 - -Use `echo` to print your `I` variable again. - -#### HINTS - -- Type `echo $I` in the terminal and press enter. - -## 897. $(( I + 4 )) - -### 897.1 - -It should have printed `11` for the value of `I`. Using the double parenthesis like you have been is good for changing variable values or making comparisons. It makes the calculation in place and provides no output. If you want to make a calculation and do something with the result, add a `$` in front like this: `$(( ... ))`. Type `$(( I + 4 ))` in the terminal to see what happens. - -#### HINTS - -- If it didn't print `11` for `I`, enter `I=11` to set it to `11` -- Type `$(( I + 4 ))` in the terminal and press enter - -## 899. echo $(( I + 4 )) - -### 899.1 - -It should say, `bash: 15: command not found`. It replaced the command with the result of the calculation. Effectively, trying to run `15` as a command. Enter the same command, but put `echo` in front of it. The command was `$(( I + 4 ))` - -#### HINTS - -- Type `echo $(( I + 4 ))` in the terminal and press enter - -## 902. echo $I - -### 902.1 - -Again, it replaced the calculation with the result. So it was basically the same as if you entered `echo 15`. Use `echo` to print `I` to the screen again. - -#### HINTS - -- Type `echo $I` in the terminal and press enter - -## 905. J=$(( I - 6 )) - -### 905.1 - -It should still have printed `11` for `I`. See the hints if it didn't. These double parenthesis with a `$` are how you can assign a variable to some calculation. In the terminal, create a `J` variable, and use the `$(( ... ))` syntax to set its value to `I - 6`. - -#### HINTS - -- If it didn't print `11` for `I`, enter `I=11` to set it to `11` -- Type `J=$(( I - 6 ))` in the terminal and press enter - -## 908. echo $J - -### 908.1 - -Use `echo` to print `J`. - -#### HINTS - -- Here's an example: `echo $` -- Type `echo $J` in the terminal and press enter - -## 911. echo $(( J * 5 + 25 )) - -### 911.1 - -`J` should equal `5`. For some more practice, use `echo` to print the value `J * 5 + 25`. - -#### HINTS - -- Type `echo $(( J * 5 + 25 ))` in the terminal and press enter - -## 912. echo $J - -### 912.1 - -It should have printed `50`. Print `J` with `echo` again. - -#### HINTS - -- Here's an example: `echo $` -- Type `echo $J` in the terminal and press enter - -## 913. declare -p - -### 913.1 - -So, as a reminder, `(( ... ))` will perform a calculation or operation and output nothing. `$(( ... ))` will replace the calculation with the result of it. You made a few variables in this shell, view them with `declare -p`. - -#### HINTS - -- Type `declare -p` in the terminal and press enter - -## 914. declare -p J - -### 914.1 - -`declare` can be used to create variables, but you are just going to use it to view them for now. If you scroll up a little, you should find your `I` and `J` variables in there. View `J` with `declare -p J`. - -#### HINTS - -- Type `declare -p J` in the terminal and press enter - -## 916. declare -p RANDOM - -### 916.1 - -I saw `RANDOM` in that list, too. View it with `declare -p ` like you did for `J`. - -#### HINTS - -- Type `declare -p RANDOM` in the terminal and press enter - -## 918. echo $(( RANDOM % 75 )) - -### 918.1 - -Okay, I think I finally know how to get the random number for the Bingo Number Generator. Use `echo` and `RANDOM % 75` to print a random number in the terminal. - -#### HINTS - -- Use the `$(( ... ))` syntax to calculate the random number -- Here's an example: `echo $(( ))` -- Type `echo $(( RANDOM % 75 ))` in the terminal and press enter - -## 920. echo $(( RANDOM % 75 + 1 )) - -### 920.1 - -One tiny problem, that calculation will give a number between 0 and 74. Enter the same command in the terminal, but add `1` to the calculation to get a random number between 1 and 75. - -#### HINTS - -- Type `echo $(( RANDOM % 75 + 1 ))` in the terminal and press enter - -## 928. Set NUMBER=$(( RANDOM % 75 + 1)) - -### 928.1 - -Back in your `bingo.sh` script, change the `NUMBER` variable so that it starts as a random number between 1 and 75 using the syntax you have been practicing. - -#### HINTS - -- Change the `NUMBER` variable to the result of the calculation `RANDOM % 75 + 1` -- Use the `$(( ... ))` syntax to make the calculation -- It should look like this: `NUMBER=$(( RANDOM % 75 + 1 ))` - -## 930. run ./bingo.sh - -### 930.1 - -Run your script a few times in a row to make sure it's working. - -#### HINTS - -- Type `./bingo.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Run it at least two times in a row - -## 940. Add TEXT variable - -### 940.1 - -Next, create a `TEXT` variable and set the value to `"The next number is, "`. When the script is finished, the output will be something like `The next number is B:15`. - -#### HINTS - -- Make sure there's a space after the comma -- Add `TEXT="The next number is, "` to the `bingo.sh` file - -## 945. help let - -### 945.1 - -The letter that goes with the random number depends on what the number is. If it's 15 or less, it will be a `B`. I saw some comparisons in the `help let` menu, take a look at it again. - -#### HINTS - -- Type `help let` in the terminal and press enter - -## 950. Add first if <= 15 - -### 950.1 - -You used the double square brackets with your `if` statement in the last program, but you can use the double parenthesis with these operators as well. In your script, create an `if` statement that uses double parenthesis for the condition. Check if the number variable is less than or equal to 15. If it is, use your two variables to print `The next number is, B:`. - -#### HINTS - -- Make sure you only have two `echo` statements in your script, the title being one of them -- Here's an example of how your `if` statement should look: -```sh -if (( CONDITION )) -then - STATEMENTS -fi -``` -- The condition you want is `(( NUMBER <= 15 ))` -- In the statements area, use `echo` and your two variables to print `The next number is, B:` -- The statements area should look like this: `echo $TEXT B:$NUMBER` -- The whole `if` statement should look like this: -```sh -if (( NUMBER <= 15 )) -then - echo $TEXT B:$NUMBER -fi -``` - -## 960. Add elif -le 30 - -### 960.1 - -`if` statements can have an "else if" area like this: -```sh -if (( CONDITION )) -then - STATEMENTS -elif [[ CONDITION ]] -then - STATEMENTS -fi -``` - -Using the double square brackets this time, add an `elif` condition that checks if the number variable is less than or equal to `30`. If it is, use your two variables again to print `The next number is, I:` - -#### HINTS - -- View the `help test` menu to see the operators you can use with the double square brackets -- The condition you want is `[[ $NUMBER -le 30 ]]`. Don't forget the `$` -- In the statements area, use `echo` and your two variables to print `The next number is, I:` -- The statements area should look like this: `echo $TEXT I:$NUMBER` -- The `elif` area should look like this: -```sh -elif [[ $NUMBER -le 30 ]] -then - echo $TEXT I:$NUMBER -fi -``` -- The whole `if` statement should look like this: -```sh -if (( NUMBER <= 15 )) -then - echo $TEXT B:$NUMBER -elif [[ $NUMBER -le 30 ]] -then - echo $TEXT I:$NUMBER -fi -``` - -## 970. Add elif < 46 - -### 970.1 - -You can add as many `elif` sections to an `if` statement as you want. Add another `elif`, below the last, one that uses the double parenthesis to check if the number variable is less than 46. If it is, use your two variables to print `The next number is, N:` - -#### HINTS - -- View the `help let` menu to see the operators you can use with the double parenthesis -- The operator you want it `<` -- You can add another `elif` like this: -```sh -if CONDITION -then - STATEMENTS -elif CONDITION -then - STATEMENTS -elif CONDITION -then - STATEMENTS -fi -``` -- The condition you want is `(( NUMBER < 46 ))` -- In the statements area, use `echo` and your two variables to print `The next number is, N:` -- The statements area should look like this: `echo $TEXT N:$NUMBER` -- This `elif` area should look like this: -```sh -elif (( NUMBER < 46 )) -then - echo $TEXT N:$NUMBER -fi -``` -- The whole `if` statement should look like this: -```sh -if (( NUMBER <= 15 )) -then - echo $TEXT B:$NUMBER -elif [[ $NUMBER -le 30 ]] -then - echo $TEXT I:$NUMBER -elif (( NUMBER < 46 )) -then - echo $TEXT N:$NUMBER -fi -``` - -## 980. Add elif -lt 61 - -### 980.1 - -Run your script if you want to see the output. It should print one of the sentences if the random number is less than 46. It may take a couple tries. Add another `elif`, below the last one, that uses double square brackets to check if the number variable is less than 61. If it is, use your two variables to print `The next number is, G:` - -#### HINTS - -- View the `help test` menu to see the operators you can use with the double square brackets -- The operator you want it `-lt` -- The condition you want is `[[ $NUMBER -lt 61 ]]`. Don't forget the `$` -- The statements area should look like this: `echo $TEXT G:$NUMBER` -- This `elif` area should look like this: -```sh -elif [[ $NUMBER -lt 61 ]] -then - echo $TEXT G:$NUMBER -fi -``` -- The whole `if` statement should look like this: -```sh -if (( NUMBER <= 15 )) -then - echo $TEXT B:$NUMBER -elif [[ $NUMBER -le 30 ]] -then - echo $TEXT I:$NUMBER -elif (( NUMBER < 46 )) -then - echo $TEXT N:$NUMBER -elif [[ $NUMBER -lt 61 ]] -then - echo $TEXT G:$NUMBER -fi -``` - -## 990. Add else - -### 990.1 - -One more case to handle. Add an `else` at the bottom of the `if` that uses your two variables to print `The next number is, O:`. - -#### HINTS - -- View the `if/else` in your `countdown.sh` file to see how you did it before -- You don't need a condition or the `then` on this one -- Here's an example: -```sh -if CONDITION -then - STATEMENTS -elif CONDITION -then - STATEMENTS -... -else - STATEMENTS -fi -``` -- The `else` area should look like this: -```sh -else - echo $TEXT O:$NUMBER -``` -- The whole `if` should look like this: -```sh -if (( NUMBER <= 15 )) -then - echo $TEXT B:$NUMBER -elif [[ $NUMBER -le 30 ]] -then - echo $TEXT I:$NUMBER -elif (( NUMBER < 46 )) -then - echo $TEXT N:$NUMBER -elif [[ $NUMBER -lt 61 ]] -then - echo $TEXT G:$NUMBER -else - echo $TEXT O:$NUMBER -fi -``` - -## 1000. ./bingo.sh - -### 1000.1 - -Run your script a few times and make sure it's working. - -#### HINTS - -- Type `./bingo.sh` in the terminal and press enter -- Make sure you are in the `project` folder first -- Run it at least two times in a row - -## 1010. touch fortune.sh - -### 1010.1 - -I think the generator is done :smile: The next project is a fortune teller. Use the `touch` command to create `fortune.sh` in the same folder as the other scripts. - -#### HINTS - -- Type `touch fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1020. chmod +x fortune.sh - -### 1020.1 - -Give your file executable permissions. - -#### HINTS - -- Use the `chmod` command with the `+x` flag -- Here's an example `chmod ` -- You previously used `chmod +x bingo.sh` -- Type `chmod +x fortune.sh` in the terminal and press enter - -## 1030. Add shebang - -### 1030.1 - -Add a `shebang` at the top of your new file that uses `bash` again. - -#### HINTS - -- A `shebang` looks like this: `#!` -- Enter `which bash` in the terminal to see the path to `bash` -- Look at the `shebang` in one of your other scripts to get the syntax -- It should look like this: `#!/bin/bash` -- Add `#!/bin/bash` at the top of your `fortune.sh` file - -## 1040. Add comment - -### 1040.1 - -Add comment `Program to tell a persons fortune` - -#### HINTS - -- Comments look like this: `# ` -- Add `#Program to tell a persons fortune` below the `shebang` -- Capitalization matters - -## 1050. Add echo "title" - -### 1050.1 - -Add a title for this one like the others. This one should say `~~ Fortune Teller ~~`. Don't forget the empty line before and after it. - -#### HINTS - -- Print the whole title and the empty lines with a single `echo` command -- Use the `echo` command with the `-e` flag and the new line (`\n`) character -- Don't forget to put it in double quotes -- Take a look at one of the title's from a previous file for a hint -- Here's an example: `echo -e "\n\n"` -- You previously used `echo -e "\n~~ Bingo Number Generator ~~\n"` -- Add `echo -e "\n~~ Fortune Teller ~~\n"` below the comment of your `fortune.sh` file - -## 1060. ./fortune.sh - -### 1060.1 - -Run the file once to make sure it's working. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1070. ARR=("a" "b" "c") - -### 1070.1 - -This program will have an array of responses. One will be printed randomly after a user inputs a question. Practice first :smile: In the terminal, create an array like this: `ARR=("a" "b" "c")` - -#### HINTS - -- Type the suggested command in the terminal -- Type `ARR=("a" "b" "c")` in the terminal and press enter - -## 1080. echo ${ARR[1]} - -### 1080.1 - -Each variable in the array is like any other variable, just combined into a single variable. In the terminal, print the second item in the array with `echo ${ARR[1]}`. Note that the first item would be index zero. - -#### HINTS - -- Type `echo ${ARR[1]}` in the terminal - -## 1090. echo ${ARR[@]} - -### 1090.1 - -If you recall, you were able to print all the arguments to your `countdown.sh` script with `echo $*`. `echo $@` would have worked as well. Similarly, you can use the `*` or `@` to print your whole array. In the terminal, use `echo` to print all the items in your array. - -#### HINTS - -- Here's an example `echo ${ARR[]}` -- Type `echo ${ARR[@]}` in the terminal and press enter - -## 1100. declare -p ARR - -### 1100.1 - -The variable must be in that `declare` list. View your array variable using the `declare` command and the `-p` flag. - -#### HINTS - -- Here's an example: `declare -p ` -- Type `declare -p ARR` in the terminal - -## 1110. Add RESPONSES array - -### 1110.1 - -The `-a` next to it stands for `array`. In your script, create an array named `RESPONSES`. Give it these six values: `Yes`, `No`, `Maybe`, `Outlook good`, `Don't count on it`, and `Ask again later`. - -#### HINTS - -- Here's an example: `VARIABLE=(value value ...)` -- Make sure any values with spaces are in proper quotes -- You created your other array with `ARR=("a" "b" "c")` -- Add `RESPONSES=("Yes" "No" "Maybe" "Outlook good" "Don't count on it" "Ask again later")` in your script - -## 1120. echo ${RESPONSES[5]} - -### 1120.1 - -In your script, use `echo` to print the last item in the array. - -#### HINTS - -- Here's an example `echo ${ARR[]}` -- Remember that the first item starts at zero -- Add `echo ${RESPONSES[5]}` to your `fortune.sh` file - -## 1130. ./fortune.sh - -### 1130.1 - -Run it to see the output. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1140. Add N=$(( RANDOM % 6 )) - -### 1140.1 - -You will randomly print one of the values. In your script, create a variable named `N`. Set it equal to a random number between `0` and `5`, the first and last index of the array. - -#### HINTS - -- Use the modulus (`%`) operator and `6` to get a number between `0` and `5` -- Look at the random number you created in the `bingo.sh` file for a hint -- Here's an example: `VARIABLE=$(( ))` -- Calculate a random number in the range you want with `RANDOM % 6` -- Add `N=$(( RANDOM % 6 ))` to the script - -## 1150. Change to echo ${RESPONSES[$N]} - -### 1150.1 - -Change your `echo` command to print the item in the array whose index is the random number you generated. - -#### HINTS - -- Use your `$N` variable as the index where you print an item from the array -- Don't forget that scripts run from top to bottom, so you can't use any variables before they are created -- Change the `echo` line to `echo ${RESPONSES[$N]}` - -## 1160. help - -### 1160.1 - -You will create a function to generate an answer. Check the `help` menu to see if you can find anything. - -#### HINTS - -- Enter the suggested command in the terminal -- Type `help` in the terminal - -## 1170. help function - -### 1170.1 - -See any that might help? There's one that says `function`. See if you can find out more about it. - -#### HINTS - -- Use the `help` command to find out more -- Here's an example: `help ` -- Type `help function` in the terminal - -## 1180. Add GET_FORTUNE function - -### 1180.1 - -It looks like you can create a function like this: - -```sh -FUNCTION_NAME() { - STATEMENTS -} -``` - -Add an empty function named `GET_FORTUNE` to your script. Make sure the response you are printing is the last thing in the script. - -#### HINTS - -- Add this to your script: -```sh -GET_FORTUNE() {} -``` -- Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file - -## 1190. Add echo Ask a yes or no question - -### 1190.1 - -In your function, use `echo` to print `Ask a yes or no question:` - -#### HINTS - -- Your function should look like this: -```sh -GET_FORTUNE() { - echo Ask a yes or no question: -} -``` -- Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file - -## 1200. Add GET_FORTUNE function call - -### 1200.1 - -Call your function by putting the name of it below where you create it. No `$` needed. Make sure the response you are printing is at the bottom of the file. - -#### HINTS - -- Add `GET_FORTUNE` below where you create your function to call it -- Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file - -## 1210. ./fortune.sh - -### 1210.1 - -Run your script to make sure it's working. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1220. Add read QUESTION - -### 1220.1 - -In your function after you print the sentence, use `read` to get user input into a variable named `QUESTION`. - -#### HINTS - -- Add `read QUESTION` to your function below the `echo` -- Your function should look like this: -```sh -GET_FORTUNE() { - echo Ask a yes or no question: - read QUESTION -} -``` -- Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file - -## 1230. ./fortune.sh - -### 1230.1 - -Run the script again to test it out. Enter a question when it asks. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1240. help - -### 1240.1 - -I want to make sure the input is a question. You are going to add a loop that asks for input until the input ends with a question mark. View the `help` menu to see if you can find an appropriate loop. - -#### HINTS - -- Type `help` in the terminal and press enter - -## 1250. help until - -### 1250.1 - -View more about that `until` command. That might be the one to use here. - -#### HINTS - -- Use `help ` to view more about a command -- Type `help until` in the terminal and press enter - -## 1260. Add until loop - -### 1260.1 - -The `until` loop is very similar to the `while` loop you used. It will execute the loop until a condition is met. Here's an example: - -```sh -until [[ CONDITION ]] -do - STATEMENTS -done -``` - -Add an `until` loop below your function. Use the double brackets to check if `QUESTION` is equal to `test?`. Move the `GET_FORTUNE` function call to the statements area of the loop. It should run the function until you input `test?` as the question. - -#### HINTS - -- View the `help [[` or `help test` menu to see if you can find the operator to use -- You want the `==` operator -- The condition should look like this: `[[ $QUESTION == test? ]]` -- Your `until` loop should look like this: -```sh -until [[ $QUESTION == test? ]] -do - GET_FORTUNE -done -``` -- You should only call the `GET_FORTUNE` function once -- Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file - -## 1270. ./fortune.sh - -### 1270.1 - -Run the script and enter something other than `test?`. Then enter `test?` after it asks for a question the second time. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1280. help [[ expression ]] - -### 1280.1 - -View that `help [[ expression ]]` menu again. You need to find out how to test if the input ends with a question mark (`?`). - -#### HINTS - -- Type `help [[` or `help [[ expression ]]` in the terminal and press enter - -## 1290. [[ hello == hello ]]; echo $? - -### 1290.1 - -Let's play with these again. You can test if two strings are the same with `==`. In the terminal, use the `[[ ... ]]; echo $?` syntax you used before to test if `hello` is equal to `hello`. - -#### HINTS - -- Be sure to use the `==` operator -- Type `[[ hello == hello ]]; echo $?` in the terminal and press enter - -## 1300. [[ hello == world ]]; echo $? - -### 1300.1 - -Exit status of `0`, it was true. Using the same syntax, test if `hello` is equal to `world`. - -#### HINTS - -- Use the `[[ ... ]]; echo $?` syntax -- Be sure to use the `==` operator -- Type `[[ hello == world ]]; echo $?` in the terminal and press enter - -## 1310. [[ hello =~ el ]]; echo $? - -### 1310.1 - -False. An important operator in that menu is `=~`. It allows for pattern matching. Using the same syntax but with this operator, check if `hello` contains the pattern `el`. - -#### HINTS - -- Use the `[[ ... ]]; echo $?` syntax -- Use the `=~` operator with it -- Type `[[ hello =~ el ]]; echo $?` in the terminal and press enter - -## 1320. [[ "hello world" =~ "lo wor" ]]; echo $? - -### 1320.1 - -True. The condition was checking for `el` within the word `hello`. Using the same syntax, check if `hello world` contains the pattern `lo wor`. You will need to put them both in quotes so it recognizes the spaces. - -#### HINTS - -- Use the `[[ ... ]]; echo $?` syntax -- Use the `=~` operator with it -- Type `[[ "hello world" =~ "lo wor" ]]; echo $?` in the terminal and press enter - -## 1330. [[ "hello world" =~ ^h ]]; echo $? - -### 1330.1 - -Your patterns have been checking for literal matches, `el` and `lo wor`. You can use regular expression characters as well, but you can't put the pattern in quotes when you do. Using the same syntax, check if `hello world` starts with an `h` by using `^h` as the pattern. - -#### HINTS - -- Make sure not to use quotes around the pattern when using regex characters it -- Type `[[ "hello world" =~ ^h ]]; echo $?` in the terminal - -## 1340. [[ "hello world" =~ ^h.+d$ ]]; echo $? - -### 1340.1 - -Do it again, but use `^h.+d$` as the pattern to see if the string starts with an `h`, has at least one character after it, and ends with a `d`. - -#### HINTS - -- Use the `[[ ... ]]; echo $?` syntax again -- Check if `hello world` contains the suggested pattern -- Make sure not to use quotes around the pattern when using regex characters it -- Type `[[ "hello world" =~ ^h.+d$ ]]; echo $?` in the terminal - -## 1350. VAR="hello world" - -### 1350.1 - -In the terminal, create a variable named `VAR` that equals `hello world`. - -#### HINTS - -- Type `VAR="hello world"` in the terminal - -## 1360. echo $VAR - -### 1360.1 - -Use `echo` to print the variable you just created. - -#### HINTS - -- Type `echo $VAR` in the terminal - -## 1370. [[ $VAR == "hello world" ]]; echo $? - -### 1370.1 - -Using the `[[ ... ]]; echo $?` syntax, check if your variable is equal to `hello world`. - -#### HINTS - -- Check the `help [[` menu to find the operator to use -- It's the `==` operator -- You want to check if `$VAR == "hello world"` -- Type `[[ $VAR == "hello world" ]]; echo $?` in the terminal - -## 1380. [[ $VAR =~ \?$ ]; echo $? - -### 1380.1 - -Using the same syntax, check if your variable ends with `?` by using the pattern `\?$`. - -#### HINTS - -- Be sure to use the pattern matching operator -- It's the `=~` operator -- You want to check if `$VAR =~ \?$` -- Type `[[ $VAR =~ \?$ ]]; echo $?` in the terminal - -## 1385. [[ test? =~ \?$ ]; echo $? - -### 1385.1 - -It doesn't end with `?`. Just to make sure I don't have the pattern wrong, check if `test?` ends with `?`. - -#### HINTS - -- Use the same `[[ ... ]]; echo $?` syntax you have been using -- Use the `\?$` pattern to see if a string ends with `?` -- Make sure you're using the pattern matching operator `=~` -- You want to check if `test? =~ \?$` -- Type `[[ test? =~ \?$ ]]; echo $?` in the terminal - -## 1390. Change until condition - -### 1390.1 - -I think that will work. Back in your script, change the `until` condition to see if your variable ends with `?`. - -#### HINTS - -- Use the pattern matching operator with `\?$` -- It's the `=~` operator -- Your condition should look like this: `[[ $QUESTION =~ \?$ ]]` -- Make sure there's spaces inside the brackets and around the operator - -## 1400. ./fortune.sh - -### 1400.1 - -Run the script and input something that doesn't end with `?` the first time, then something that does the second. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1410. Add if to GET_FORTUNE - -### 1410.1 - -I know that it asks the same thing if the input isn't what you want. You should let users know that it needs to end with `?`. Add an `if` condition in your **function** that checks `if [[ ! $1 ]]`. Put the existing `echo` statement in the `then` area and make sure the existing `read` is below the whole `if` condition. - -#### HINTS - -- Here's an example: -```sh -if [[ CONDITION ]] -then - STATEMENTS -fi - -read QUESTION -``` -- Your function should look like this: -```sh -function GET_FORTUNE() { - if [[ ! $1 ]] - then - echo Ask a yes or no question: - fi - - read QUESTION -} -``` - -## 1412. Add else to if [[ ! $1 ]] - -### 1412.1 - -You can pass arguments to functions like you did with your script. This condition will check if one isn't passed and print the sentence. Add an `else` to your `if`. Use `echo` to print `Try again. Make sure it ends with a question mark:` if the condition fails. - -#### HINTS - -- Here's an example: -```sh -if [[ CONDITION ]] -then - STATEMENTS -else - STATEMENTS -fi -``` -- Your `if` condition should look like this: -```sh -if [[ ! $1 ]] -then - echo Ask a yes or no question: -else - echo Try again. Make sure it ends with a question mark: -fi -``` - -## 1413. Add argument to function call - -### 1413.1 - -Now, your function will print one thing if you pass it any argument, and something else if not. In the `until` loop, add `again` as an argument to where you call the function. - -#### HINTS - -- Here's an example: `FUNCTION_NAME argument` -- Your function call should look like this: `GET_FORTUNE again` -- Your `until` loop should look like this: -```sh -until [[ $QUESTION =~ \?$ ]] -do - GET_FORTUNE again -done -``` - -## 1416. Add Initial function call - -### 1416.1 - -Now, each time the function is called in the `until` loop, it will pass `again` as an argument and print the `Try again...` sentence. Before your `until` loop, call the function without an argument so the first time it runs, it prints the initial sentence. - -#### HINTS - -- Add `GET_FORTUNE` before the `until` loop - -## 1420. ./fortune.sh - -### 1420.1 - -Run the script and enter something without a question mark when it asks the first time. Use a question mark the second time. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1425. Add line break in front of response - -### 1425.1 - -Awesome. One last thing. Add an empty line in front of where you print the response. - -#### HINTS - -- Change the existing `echo ${RESPONSES[$N]}` line -- Use the `-e` flag and the new line (`\n`) character with the `echo` statement -- Make sure to use quotes so it prints the new line -- Run the script and see if it's working -- The suggested command should look like this: `echo -e "\n${RESPONSES[$N]}"` - -## 1428. ./fortune.sh - -### 1428.1 - -Run the script one more time to see if you like the output. - -#### HINTS - -- Type `./fortune.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1430. touch five.sh - -### 1430.1 - -Excellent. One last program to make. Use `touch` to create a new file named `five.sh` in the same folder as the others. - -#### HINTS - -- Type `touch five.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1440. chmod +x five.sh - -### 1440.1 - -Give your file executable permissions. - -#### HINTS - -- Use the `chmod` command with the `+x` flag -- Here's an example `chmod ` -- You previously used `chmod +x fortune.sh` -- Type `chmod +x five.sh` in the terminal and press enter - -## 1450. Add shebang - -### 1450.1 - -Add a `shebang` to the new script that uses `bash` like the others. - -#### HINTS - -- A `shebang` looks like this: `#!` -- Enter `which bash` in the terminal to see the path to `bash` -- Look at the `shebang` in one of your other scripts to get the syntax -- It should look like this: `#!/bin/bash` -- Add `#!/bin/bash` at the top of your `five.sh` file - -## 1460. Add comment - -### 1460.1 - -Add a comment below the `shebang` that says, `Program to run my other four programs` - -#### HINTS - -- Comments look like this: `# ` -- Add `# Program to run my other four programs` below the `shebang` -- Capitalization matters - -## 1470. Add ./questionnaire.sh - -### 1470.1 - -This program will run all the programs you made so far consecutively. Add the command to run the `questionnaire.sh` file. - -#### HINTS - -- The command should look like how you would execute the file in the terminal -- Add `./questionnaire.sh` to the `five.sh` file - -## 1480. ./five - -### 1480.1 - -Run the file to see if it works. Enter input when it asks. - -#### HINTS - -- Type `./five.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1490. Add the rest of the scripts - -### 1490.1 - -Add commands to run the rest of your scripts in the file. They should be in this order: `questionnaire`, `countdown`, `bingo`, and `fortune`. Don't forget that your `countdown.sh` file needs an argument, so put a `3` next to it. - -#### HINTS - -- Your `five.sh` file should have these commands: -```sh -./questionnaire.sh -./countdown.sh 3 -./bingo.sh -./fortune.sh -``` - -## 1500. Clear - -### 1500.1 - -Okay, use `clear` to empty out what's in the terminal before the big moment. - -#### HINTS - -- Type `clear` in the terminal - -## 1510. ./five - -### 1510.1 - -Run the script and enter input when it asks. - -#### HINTS - -- Type `./five.sh` in the terminal and press enter -- Make sure you are in the `project` folder first - -## 1520. help - -### 1520.1 - -Cool. I think all the scripts are done. View the `help` menu again I want to explore one more thing. - -#### HINTS - -- Type `help` in the terminal and press enter - -## 1530. help type - -### 1530.1 - -View more about that `type` command. - -#### HINTS - -- Use `help ` to find out more about a command -- Type `help type` in the terminal and press enter - -## 1540. type echo - -### 1540.1 - -It says you can view the type of a command with `type `. Just for fun, lets take a look at the type of a few different commands. View the type of `echo`. - -#### HINTS - -- Type `type echo` in the terminal and press enter - -## 1550. type read - -### 1550.1 - -View the type of the `read` command. - -#### HINTS - -- Type `type read` in the terminal and press enter - -## 1560. type if - -### 1560.1 - -View the type of `if` - -#### HINTS - -- Type `type if` in the terminal and press enter - -## 1570. type then - -### 1570.1 - -View the type of `then` - -#### HINTS - -- Type `type then` in the terminal and press enter - -## 1580. type bash - -### 1580.1 - -Those were all from the `help` menu and described as a `shell builtin` or `shell keyword`. View the type of `bash` - -#### HINTS - -- Type `type bash` in the terminal and press enter - -## 1590. type psql - -### 1590.1 - -That's the location of the `bash` command. View the type of `psql`. - -#### HINTS - -- Type `type psql` in the terminal and press enter - -## 1600. type ./five.sh - -### 1600.1 - -It's showing the location of the commands. View the type of your `./five.sh` file. - -#### HINTS - -- Type `type ./five.sh` in the terminal and press enter - -## 1610. exit - -### 1610.1 - -Last step, close the terminal with the `exit` command. Thanks and happy coding! - -#### HINTS - -- Type `exit` in the terminal and press enter diff --git a/coderoad.yaml b/coderoad.yaml deleted file mode 100644 index 3be3c401dd..0000000000 --- a/coderoad.yaml +++ /dev/null @@ -1,1349 +0,0 @@ -id: 'freeCodeCamp/learn-bash-scripting-by-building-five-programs:v1.0.0' -version: '2.0.0' -config: - setup: - commands: - - ./.freeCodeCamp/setup.sh - - cd .freeCodeCamp && npm install - testRunner: - command: npm run programmatic-test - args: - tap: --reporter=mocha-tap-reporter - directory: .freeCodeCamp - repo: - uri: https://github.com/freeCodeCamp/learn-bash-scripting-by-building-five-programs - branch: v2.0.0 - continue: - commands: - - './.freeCodeCamp/setup.sh' - - './.freeCodeCamp/reset.sh' - reset: - commands: - - './.freeCodeCamp/setup.sh' - - './.freeCodeCamp/reset.sh' - dependencies: - - name: node - version: '>=10' - webhook: - url: 'https://api.freecodecamp.org/coderoad-challenge-completed' - events: - init: false - reset: false - step_complete: false - level_complete: false - tutorial_complete: true -levels: - - id: '10' - steps: - - id: '10.1' - setup: - watchers: - - ../.bash_history - - id: '20' - steps: - - id: '20.1' - setup: - watchers: - - ../.bash_history - - id: '30' - steps: - - id: '30.1' - setup: - watchers: - - ./questionnaire.sh - - id: '35' - steps: - - id: '35.1' - setup: - watchers: - - ../.bash_history - - id: '40' - steps: - - id: '40.1' - setup: - watchers: - - ../.bash_history - - id: '50' - steps: - - id: '50.1' - setup: - watchers: - - ../.bash_history - - id: '60' - steps: - - id: '60.1' - setup: - watchers: - - ./questionnaire.sh - - id: '70' - steps: - - id: '70.1' - setup: - watchers: - - ../.bash_history - - id: '80' - steps: - - id: '80.1' - setup: - watchers: - - ../.bash_history - - id: '90' - steps: - - id: '90.1' - setup: - watchers: - - ../.bash_history - - id: '100' - steps: - - id: '100.1' - setup: - watchers: - - ../.bash_history - - id: '110' - steps: - - id: '110.1' - setup: - watchers: - - ../.bash_history - - id: '140' - steps: - - id: '140.1' - setup: - watchers: - - ./questionnaire.sh - - id: '150' - steps: - - id: '150.1' - setup: - watchers: - - ../.bash_history - - id: '160' - steps: - - id: '160.1' - setup: - watchers: - - ./questionnaire.sh - - id: '170' - steps: - - id: '170.1' - setup: - watchers: - - ./questionnaire.sh - - id: '180' - steps: - - id: '180.1' - setup: - watchers: - - ./questionnaire.sh - - id: '190' - steps: - - id: '190.1' - setup: - watchers: - - ../.bash_history - - id: '200' - steps: - - id: '200.1' - setup: - watchers: - - ./questionnaire.sh - - id: '210' - steps: - - id: '210.1' - setup: - watchers: - - ./questionnaire.sh - - id: '220' - steps: - - id: '220.1' - setup: - watchers: - - ../.bash_history - - id: '230' - steps: - - id: '230.1' - setup: - watchers: - - ./questionnaire.sh - - id: '240' - steps: - - id: '240.1' - setup: - watchers: - - ./questionnaire.sh - - id: '250' - steps: - - id: '250.1' - setup: - watchers: - - ./questionnaire.sh - - id: '260' - steps: - - id: '260.1' - setup: - watchers: - - ./questionnaire.sh - - id: '270' - steps: - - id: '270.1' - setup: - watchers: - - ../.bash_history - - id: '280' - steps: - - id: '280.1' - setup: - watchers: - - ./questionnaire.sh - - id: '290' - steps: - - id: '290.1' - setup: - watchers: - - ../.bash_history - - id: '300' - steps: - - id: '300.1' - setup: - watchers: - - ../.bash_history - - id: '310' - steps: - - id: '310.1' - setup: - watchers: - - ../.bash_history - - id: '320' - steps: - - id: '320.1' - setup: - watchers: - - ./questionnaire.sh - - id: '323' - steps: - - id: '323.1' - setup: - watchers: - - ../.bash_history - - id: '326' - steps: - - id: '326.1' - setup: - watchers: - - ./questionnaire.sh - - id: '330' - steps: - - id: '330.1' - setup: - watchers: - - ../.bash_history - - id: '340' - steps: - - id: '340.1' - setup: - watchers: - - ./questionnaire.sh - - id: '345' - steps: - - id: '345.1' - setup: - watchers: - - ./questionnaire.sh - - id: '350' - steps: - - id: '350.1' - setup: - watchers: - - ./questionnaire.sh - - id: '360' - steps: - - id: '360.1' - setup: - watchers: - - ./questionnaire.sh - - id: '363' - steps: - - id: '363.1' - setup: - watchers: - - ../.bash_history - - id: '366' - steps: - - id: '366.1' - setup: - watchers: - - ./questionnaire.sh - - id: '370' - steps: - - id: '370.1' - setup: - watchers: - - ../.bash_history - - id: '380' - steps: - - id: '380.1' - setup: - watchers: - - ../.bash_history - - id: '390' - steps: - - id: '390.1' - setup: - watchers: - - ../.bash_history - - id: '400' - steps: - - id: '400.1' - setup: - watchers: - - ./countdown.sh - - id: '410' - steps: - - id: '410.1' - setup: - watchers: - - ./countdown.sh - - id: '420' - steps: - - id: '420.1' - setup: - watchers: - - ./countdown.sh - - id: '425' - steps: - - id: '425.1' - setup: - watchers: - - ../.bash_history - - id: '430' - steps: - - id: '430.1' - setup: - watchers: - - ../.bash_history - - id: '440' - steps: - - id: '440.1' - setup: - watchers: - - ./countdown.sh - - id: '450' - steps: - - id: '450.1' - setup: - watchers: - - ../.bash_history - - id: '460' - steps: - - id: '460.1' - setup: - watchers: - - ../.bash_history - - id: '470' - steps: - - id: '470.1' - setup: - watchers: - - ../.bash_history - - id: '480' - steps: - - id: '480.1' - setup: - watchers: - - ../.bash_history - - id: '490' - steps: - - id: '490.1' - setup: - watchers: - - ./countdown.sh - - id: '500' - steps: - - id: '500.1' - setup: - watchers: - - ../.bash_history - - id: '505' - steps: - - id: '505.1' - setup: - watchers: - - ../.bash_history - - id: '510' - steps: - - id: '510.1' - setup: - watchers: - - ./countdown.sh - - id: '520' - steps: - - id: '520.1' - setup: - watchers: - - ../.bash_history - - id: '530' - steps: - - id: '530.1' - setup: - watchers: - - ./countdown.sh - - id: '540' - steps: - - id: '540.1' - setup: - watchers: - - ../.bash_history - - id: '542' - steps: - - id: '542.1' - setup: - watchers: - - ../.bash_history - - id: '544' - steps: - - id: '544.1' - setup: - watchers: - - ../.bash_history - - id: '546' - steps: - - id: '546.1' - setup: - watchers: - - ../.bash_history - - id: '548' - steps: - - id: '548.1' - setup: - watchers: - - ../.bash_history - - id: '550' - steps: - - id: '550.1' - setup: - watchers: - - ./countdown.sh - - id: '552' - steps: - - id: '552.1' - setup: - watchers: - - ../.bash_history - - id: '554' - steps: - - id: '554.1' - setup: - watchers: - - ../.bash_history - - id: '556' - steps: - - id: '556.1' - setup: - watchers: - - ../.bash_history - - id: '558' - steps: - - id: '558.1' - setup: - watchers: - - ../.bash_history - - id: '560' - steps: - - id: '560.1' - setup: - watchers: - - ../.bash_history - - id: '562' - steps: - - id: '562.1' - setup: - watchers: - - ../.bash_history - - id: '564' - steps: - - id: '564.1' - setup: - watchers: - - ../.bash_history - - id: '566' - steps: - - id: '566.1' - setup: - watchers: - - ../.bash_history - - id: '568' - steps: - - id: '568.1' - setup: - watchers: - - ../.bash_history - - id: '570' - steps: - - id: '570.1' - setup: - watchers: - - ../.bash_history - - id: '572' - steps: - - id: '572.1' - setup: - watchers: - - ../.bash_history - - id: '574' - steps: - - id: '574.1' - setup: - watchers: - - ../.bash_history - - id: '575' - steps: - - id: '575.1' - setup: - watchers: - - ../.bash_history - - id: '576' - steps: - - id: '576.1' - setup: - watchers: - - ../.bash_history - - id: '582' - steps: - - id: '582.1' - setup: - watchers: - - ../.bash_history - - id: '584' - steps: - - id: '584.1' - setup: - watchers: - - ../.bash_history - - id: '586' - steps: - - id: '586.1' - setup: - watchers: - - ../.bash_history - - id: '588' - steps: - - id: '588.1' - setup: - watchers: - - ./countdown.sh - - id: '590' - steps: - - id: '590.1' - setup: - watchers: - - ./countdown.sh - - id: '600' - steps: - - id: '600.1' - setup: - watchers: - - ../.bash_history - - id: '610' - steps: - - id: '610.1' - setup: - watchers: - - ../.bash_history - - id: '615' - steps: - - id: '615.1' - setup: - watchers: - - ../.bash_history - - id: '620' - steps: - - id: '620.1' - setup: - watchers: - - ./countdown.sh - - id: '630' - steps: - - id: '630.1' - setup: - watchers: - - ../.bash_history - - id: '640' - steps: - - id: '640.1' - setup: - watchers: - - ../.bash_history - - id: '650' - steps: - - id: '650.1' - setup: - watchers: - - ../.bash_history - - id: '660' - steps: - - id: '660.1' - setup: - watchers: - - ../.bash_history - - id: '670' - steps: - - id: '670.1' - setup: - watchers: - - ../.bash_history - - id: '675' - steps: - - id: '675.1' - setup: - watchers: - - ../.bash_history - - id: '680' - steps: - - id: '680.1' - setup: - watchers: - - ./countdown.sh - - id: '690' - steps: - - id: '690.1' - setup: - watchers: - - ../.bash_history - - id: '692' - steps: - - id: '692.1' - setup: - watchers: - - ./countdown.sh - - id: '694' - steps: - - id: '694.1' - setup: - watchers: - - ../.bash_history - - id: '696' - steps: - - id: '696.1' - setup: - watchers: - - ./countdown.sh - - id: '698' - steps: - - id: '698.1' - setup: - watchers: - - ../.bash_history - - id: '700' - steps: - - id: '700.1' - setup: - watchers: - - ./countdown.sh - - id: '710' - steps: - - id: '710.1' - setup: - watchers: - - ../.bash_history - - id: '730' - steps: - - id: '730.1' - setup: - watchers: - - ./countdown.sh - - id: '740' - steps: - - id: '740.1' - setup: - watchers: - - ./countdown.sh - - id: '750' - steps: - - id: '750.1' - setup: - watchers: - - ./countdown.sh - - id: '760' - steps: - - id: '760.1' - setup: - watchers: - - ./countdown.sh - - id: '770' - steps: - - id: '770.1' - setup: - watchers: - - ../.bash_history - - id: '780' - steps: - - id: '780.1' - setup: - watchers: - - ../.bash_history - - id: '790' - steps: - - id: '790.1' - setup: - watchers: - - ../.bash_history - - id: '800' - steps: - - id: '800.1' - setup: - watchers: - - ./bingo.sh - - id: '810' - steps: - - id: '810.1' - setup: - watchers: - - ./bingo.sh - - id: '815' - steps: - - id: '815.1' - setup: - watchers: - - ./bingo.sh - - id: '817' - steps: - - id: '817.1' - setup: - watchers: - - ./bingo.sh - - id: '818' - steps: - - id: '818.1' - setup: - watchers: - - ./bingo.sh - - id: '819' - steps: - - id: '819.1' - setup: - watchers: - - ../.bash_history - - id: '820' - steps: - - id: '820.1' - setup: - watchers: - - ../.bash_history - - id: '822' - steps: - - id: '822.1' - setup: - watchers: - - ../.bash_history - - id: '824' - steps: - - id: '824.1' - setup: - watchers: - - ../.bash_history - - id: '826' - steps: - - id: '826.1' - setup: - watchers: - - ../.bash_history - - id: '828' - steps: - - id: '828.1' - setup: - watchers: - - ./bingo.sh - - id: '830' - steps: - - id: '830.1' - setup: - watchers: - - ../.bash_history - - id: '835' - steps: - - id: '835.1' - setup: - watchers: - - ./bingo.sh - - id: '840' - steps: - - id: '840.1' - setup: - watchers: - - ../.bash_history - - id: '881' - steps: - - id: '881.1' - setup: - watchers: - - ../.bash_history - - id: '884' - steps: - - id: '884.1' - setup: - watchers: - - ../.bash_history - - id: '887' - steps: - - id: '887.1' - setup: - watchers: - - ../.bash_history - - id: '890' - steps: - - id: '890.1' - setup: - watchers: - - ../.bash_history - - id: '891' - steps: - - id: '891.1' - setup: - watchers: - - ../.bash_history - - id: '893' - steps: - - id: '893.1' - setup: - watchers: - - ../.bash_history - - id: '896' - steps: - - id: '896.1' - setup: - watchers: - - ../.bash_history - - id: '897' - steps: - - id: '897.1' - setup: - watchers: - - ../.bash_history - - id: '899' - steps: - - id: '899.1' - setup: - watchers: - - ../.bash_history - - id: '902' - steps: - - id: '902.1' - setup: - watchers: - - ../.bash_history - - id: '905' - steps: - - id: '905.1' - setup: - watchers: - - ../.bash_history - - id: '908' - steps: - - id: '908.1' - setup: - watchers: - - ../.bash_history - - id: '911' - steps: - - id: '911.1' - setup: - watchers: - - ../.bash_history - - id: '912' - steps: - - id: '912.1' - setup: - watchers: - - ../.bash_history - - id: '913' - steps: - - id: '913.1' - setup: - watchers: - - ../.bash_history - - id: '914' - steps: - - id: '914.1' - setup: - watchers: - - ../.bash_history - - id: '916' - steps: - - id: '916.1' - setup: - watchers: - - ../.bash_history - - id: '918' - steps: - - id: '918.1' - setup: - watchers: - - ../.bash_history - - id: '920' - steps: - - id: '920.1' - setup: - watchers: - - ../.bash_history - - id: '928' - steps: - - id: '928.1' - setup: - watchers: - - ./bingo.sh - - id: '930' - steps: - - id: '930.1' - setup: - watchers: - - ../.bash_history - - id: '940' - steps: - - id: '940.1' - setup: - watchers: - - ./bingo.sh - - id: '945' - steps: - - id: '945.1' - setup: - watchers: - - ../.bash_history - - id: '950' - steps: - - id: '950.1' - setup: - watchers: - - ./bingo.sh - - id: '960' - steps: - - id: '960.1' - setup: - watchers: - - ./bingo.sh - - id: '970' - steps: - - id: '970.1' - setup: - watchers: - - ./bingo.sh - - id: '980' - steps: - - id: '980.1' - setup: - watchers: - - ./bingo.sh - - id: '990' - steps: - - id: '990.1' - setup: - watchers: - - ./bingo.sh - - id: '1000' - steps: - - id: '1000.1' - setup: - watchers: - - ../.bash_history - - id: '1010' - steps: - - id: '1010.1' - setup: - watchers: - - ../.bash_history - - id: '1020' - steps: - - id: '1020.1' - setup: - watchers: - - ../.bash_history - - id: '1030' - steps: - - id: '1030.1' - setup: - watchers: - - ./fortune.sh - - id: '1040' - steps: - - id: '1040.1' - setup: - watchers: - - ./fortune.sh - - id: '1050' - steps: - - id: '1050.1' - setup: - watchers: - - ./fortune.sh - - id: '1060' - steps: - - id: '1060.1' - setup: - watchers: - - ../.bash_history - - id: '1070' - steps: - - id: '1070.1' - setup: - watchers: - - ../.bash_history - - id: '1080' - steps: - - id: '1080.1' - setup: - watchers: - - ../.bash_history - - id: '1090' - steps: - - id: '1090.1' - setup: - watchers: - - ../.bash_history - - id: '1100' - steps: - - id: '1100.1' - setup: - watchers: - - ../.bash_history - - id: '1110' - steps: - - id: '1110.1' - setup: - watchers: - - ./fortune.sh - - id: '1120' - steps: - - id: '1120.1' - setup: - watchers: - - ./fortune.sh - - id: '1130' - steps: - - id: '1130.1' - setup: - watchers: - - ../.bash_history - - id: '1140' - steps: - - id: '1140.1' - setup: - watchers: - - ./fortune.sh - - id: '1150' - steps: - - id: '1150.1' - setup: - watchers: - - ./fortune.sh - - id: '1160' - steps: - - id: '1160.1' - setup: - watchers: - - ../.bash_history - - id: '1170' - steps: - - id: '1170.1' - setup: - watchers: - - ../.bash_history - - id: '1180' - steps: - - id: '1180.1' - setup: - watchers: - - ./fortune.sh - - id: '1190' - steps: - - id: '1190.1' - setup: - watchers: - - ./fortune.sh - - id: '1200' - steps: - - id: '1200.1' - setup: - watchers: - - ./fortune.sh - - id: '1210' - steps: - - id: '1210.1' - setup: - watchers: - - ../.bash_history - - id: '1220' - steps: - - id: '1220.1' - setup: - watchers: - - ./fortune.sh - - id: '1230' - steps: - - id: '1230.1' - setup: - watchers: - - ../.bash_history - - id: '1240' - steps: - - id: '1240.1' - setup: - watchers: - - ../.bash_history - - id: '1250' - steps: - - id: '1250.1' - setup: - watchers: - - ../.bash_history - - id: '1260' - steps: - - id: '1260.1' - setup: - watchers: - - ./fortune.sh - - id: '1270' - steps: - - id: '1270.1' - setup: - watchers: - - ../.bash_history - - id: '1280' - steps: - - id: '1280.1' - setup: - watchers: - - ../.bash_history - - id: '1290' - steps: - - id: '1290.1' - setup: - watchers: - - ../.bash_history - - id: '1300' - steps: - - id: '1300.1' - setup: - watchers: - - ../.bash_history - - id: '1310' - steps: - - id: '1310.1' - setup: - watchers: - - ../.bash_history - - id: '1320' - steps: - - id: '1320.1' - setup: - watchers: - - ../.bash_history - - id: '1330' - steps: - - id: '1330.1' - setup: - watchers: - - ../.bash_history - - id: '1340' - steps: - - id: '1340.1' - setup: - watchers: - - ../.bash_history - - id: '1350' - steps: - - id: '1350.1' - setup: - watchers: - - ../.bash_history - - id: '1360' - steps: - - id: '1360.1' - setup: - watchers: - - ../.bash_history - - id: '1370' - steps: - - id: '1370.1' - setup: - watchers: - - ../.bash_history - - id: '1380' - steps: - - id: '1380.1' - setup: - watchers: - - ../.bash_history - - id: '1385' - steps: - - id: '1385.1' - setup: - watchers: - - ../.bash_history - - id: '1390' - steps: - - id: '1390.1' - setup: - watchers: - - ./fortune.sh - - id: '1400' - steps: - - id: '1400.1' - setup: - watchers: - - ../.bash_history - - id: '1410' - steps: - - id: '1410.1' - setup: - watchers: - - ./fortune.sh - - id: '1412' - steps: - - id: '1412.1' - setup: - watchers: - - ./fortune.sh - - id: '1413' - steps: - - id: '1413.1' - setup: - watchers: - - ./fortune.sh - - id: '1416' - steps: - - id: '1416.1' - setup: - watchers: - - ./fortune.sh - - id: '1420' - steps: - - id: '1420.1' - setup: - watchers: - - ../.bash_history - - id: '1425' - steps: - - id: '1425.1' - setup: - watchers: - - ./fortune.sh - - id: '1428' - steps: - - id: '1428.1' - setup: - watchers: - - ../.bash_history - - id: '1430' - steps: - - id: '1430.1' - setup: - watchers: - - ../.bash_history - - id: '1440' - steps: - - id: '1440.1' - setup: - watchers: - - ../.bash_history - - id: '1450' - steps: - - id: '1450.1' - setup: - watchers: - - ./five.sh - - id: '1460' - steps: - - id: '1460.1' - setup: - watchers: - - ./five.sh - - id: '1470' - steps: - - id: '1470.1' - setup: - watchers: - - ./five.sh - - id: '1480' - steps: - - id: '1480.1' - setup: - watchers: - - ../.bash_history - - id: '1490' - steps: - - id: '1490.1' - setup: - watchers: - - ./five.sh - - id: '1500' - steps: - - id: '1500.1' - setup: - watchers: - - ../.bash_history - - id: '1510' - steps: - - id: '1510.1' - setup: - watchers: - - ../.bash_history - - id: '1520' - steps: - - id: '1520.1' - setup: - watchers: - - ../.bash_history - - id: '1530' - steps: - - id: '1530.1' - setup: - watchers: - - ../.bash_history - - id: '1540' - steps: - - id: '1540.1' - setup: - watchers: - - ../.bash_history - - id: '1550' - steps: - - id: '1550.1' - setup: - watchers: - - ../.bash_history - - id: '1560' - steps: - - id: '1560.1' - setup: - watchers: - - ../.bash_history - - id: '1570' - steps: - - id: '1570.1' - setup: - watchers: - - ../.bash_history - - id: '1580' - steps: - - id: '1580.1' - setup: - watchers: - - ../.bash_history - - id: '1590' - steps: - - id: '1590.1' - setup: - watchers: - - ../.bash_history - - id: '1600' - steps: - - id: '1600.1' - setup: - watchers: - - ../.bash_history - - id: '1610' - steps: - - id: '1610.1' - setup: - watchers: - - ../.bash_history diff --git a/tutorial.json b/tutorial.json deleted file mode 100644 index 64a0faf33e..0000000000 --- a/tutorial.json +++ /dev/null @@ -1,5425 +0,0 @@ -{ - "id": "freeCodeCamp/learn-bash-scripting-by-building-five-programs:v1.0.0", - "version": "2.0.0", - "summary": { - "title": "Learn Bash Scripting by Building Five Programs", - "description": "> Welcome to the Bash Scripting lessons!" - }, - "config": { - "setup": { - "commands": [ - "./.freeCodeCamp/setup.sh", - "cd .freeCodeCamp && npm install" - ], - "commits": [ - "d1729d3899c17eeece566fe71d05efc208a7004d" - ] - }, - "testRunner": { - "command": "npm run programmatic-test", - "args": { - "tap": "--reporter=mocha-tap-reporter" - }, - "directory": ".freeCodeCamp" - }, - "repo": { - "uri": "https://github.com/freeCodeCamp/learn-bash-scripting-by-building-five-programs", - "branch": "v2.0.0" - }, - "continue": { - "commands": [ - "./.freeCodeCamp/setup.sh", - "./.freeCodeCamp/reset.sh" - ] - }, - "reset": { - "commands": [ - "./.freeCodeCamp/setup.sh", - "./.freeCodeCamp/reset.sh" - ] - }, - "dependencies": [ - { - "name": "node", - "version": ">=10" - } - ], - "webhook": { - "url": "https://api.freecodecamp.org/coderoad-challenge-completed", - "events": { - "init": false, - "reset": false, - "step_complete": false, - "level_complete": false, - "tutorial_complete": true - } - } - }, - "levels": [ - { - "id": "10", - "title": "Start the Terminal", - "summary": "", - "content": "", - "steps": [ - { - "id": "10.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c7055e012705b9ad2507f88d29235c8e89a730b2" - ] - }, - "content": "**The first thing you need to do is start the terminal.** Do that by clicking the \"hamburger\" menu at the top left of the screen, going to the \"terminal\" section, and clicking \"new terminal\". Once you open a new one, type `echo hello bash` into the terminal and press enter.", - "hints": [ - "Capitalization matters", - "If the tests don't run automatically, \"trash\" all the terminals and try the instructions again" - ] - } - ] - }, - { - "id": "20", - "title": "touch questionnaire.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "20.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "6837d9633c2074f949f97f2660f750ecd79802cd" - ] - }, - "content": "You can run commands in the terminal or put them in a file to be run as a script. You will be making five small programs to learn some scripting. The first one will be a \"questionnaire\". Use the `touch` command to create `questionnaire.sh` in the `project` folder.", - "hints": [ - "Type `touch questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "30", - "title": "Add echo questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "30.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "69d8cb725b6eb494b76e5cfad8b3473846aad07b" - ] - }, - "content": "To start, open the file in the main editor by clicking the filename in the left side panel.\nThen, add the text `echo hello questionnaire` at the top of the file.", - "hints": [ - "If the left side panel isn't visible, click the icon that looks like two pieces of paper \nat the top left to open the panel. Then, click on your file to open it", - "Add the suggested text to the `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "35", - "title": "sh questionnaire.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "35.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "e0d7f17ade077b64b799e8f3c24a6ffb4b978a65" - ] - }, - "content": "Your script has one command. Run it with `sh questionnaire.sh` to see what happens. `sh` stands for `shell`.", - "hints": [ - "Type `sh questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "40", - "title": "bash questionnaire.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "40.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "6a2a08c856faf28356a7d6f2b8f159a412ce411b" - ] - }, - "content": "Using `sh` to run your script uses the `shell` interpreter. Run your script again with `bash questionnaire.sh` to use the `bash` interpreter. `bash` stands for `bourne-again shell`.", - "hints": [ - "Type `bash questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "50", - "title": "which bash", - "summary": "", - "content": "", - "steps": [ - { - "id": "50.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "d80dd97b71cd6abd02d2ed4b724ee7c8d25f8b8d" - ] - }, - "content": "The output was the same. There are many interpreters which may not give the output you expect. Find out where the `bash` interpreter is located by entering `which bash` in the terminal.", - "hints": [ - "Type `which bash` in the terminal and press enter" - ] - } - ] - }, - { - "id": "60", - "title": "Add shebang", - "summary": "", - "content": "", - "steps": [ - { - "id": "60.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "e3f077b1b818ede2918a33226460e5f1c583e3b8" - ] - }, - "content": "That's the absolute path to the `bash` interpreter. You can tell your program to use it by placing a `shebang` at the very top of the file like this: `#!`. Add a `shebang` at the very top of your file, the one you want looks like this: `#!/bin/bash`.", - "hints": [ - "Add `#!/bin/bash` at the top of your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "70", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "70.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2313d3900a07704a6c6f6bed5d7d2ff7d956e1f9" - ] - }, - "content": "Now, instead of using `sh` or `bash` to run your script. You can run it by executing the file and it will default to bash. Execute your script with `./questionnaire.sh`. You will get a permission denied error.", - "hints": [ - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "80", - "title": "ls -l", - "summary": "", - "content": "", - "steps": [ - { - "id": "80.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "00bf064f1c87ea54174be60ca796c248472f6f19" - ] - }, - "content": "You should have got a permission denied message because you don't have permissions to execute the script. List what's in the `project` folder in long list format with `ls -l` to see the file permissions.", - "hints": [ - "Type `ls -l` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "90", - "title": "chmod +x questionnaire.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "90.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "edb643af58d65a2bef0abb46a89adffdf93de6e8" - ] - }, - "content": "Next to your file is `-rw-r--r--`. All but the first character (`-`) describe permissions different users have with the file. `r` means `read`, `w` means `write`, `x` means `execute`. I don't see an `x` anywhere, so nobody can execute it. Enter `chmod +x questionnaire.sh` in the terminal to give everyone executable permissions.", - "hints": [ - "Type `chmod +x questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "100", - "title": "ls -l", - "summary": "", - "content": "", - "steps": [ - { - "id": "100.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "5310b0313f2fbe4fb69aea2dc5a962cb56f81e19" - ] - }, - "content": "List what's in the folder again with `ls -l` to see the new permissions.", - "hints": [ - "Type `ls -l` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "110", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "110.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ce6200621c29675760247ac8cfff085734096a05" - ] - }, - "content": "The `x` was added by each type of user to denote that anyone can execute the file. Run your file again by executing it with `./questionnaire.sh`.", - "hints": [ - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "140", - "title": "Add ls -l", - "summary": "", - "content": "", - "steps": [ - { - "id": "140.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "975fe36751980fe05bc01a7330f4deb38161e584" - ] - }, - "content": "Now it works. In your script, you can add any commands that you would be able to enter in the terminal. Test this by adding the `ls -l` command below your other command.", - "hints": [ - "Add `ls -l` at the bottom of your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "150", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "150.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "032ce400565f170571d69eed514d8d81f157efe3" - ] - }, - "content": "Run the script by executing it again.", - "hints": [ - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "160", - "title": "Delete all - shebang", - "summary": "", - "content": "", - "steps": [ - { - "id": "160.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "699bbe17489321f53b356eb4c72b5ab16823822a" - ] - }, - "content": "Your script printed the result of the two commands as if you entered them in the terminal. Delete everything but the `shebang` from your file so you can start making the questionnaire.", - "hints": [ - "Only `#!/bin/bash` should remain in your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "170", - "title": "Add QUESTION1 variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "170.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "a0d5b9d8199f61a9c864b65c4f1e3b95eee21f5b" - ] - }, - "content": "Bash has variables, functions, and other things you might be familiar with. You can create a variable with `VARIABLE_NAME=VALUE`. There cannot be any spaces around the equal (`=`) sign. If a variable has any spaces in it, place double quotes around it. Create a variable named `QUESTION1` and set it's value to `\"What's your name?\"`.", - "hints": [ - "Add `QUESTION1=\"What's your name?\"` at the bottom of your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "180", - "title": "Add echo $QUESTION1", - "summary": "", - "content": "", - "steps": [ - { - "id": "180.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "cbc4c0e5e6abed357990b57c0e64b66edf5c7fd4" - ] - }, - "content": "To use a variable, place `$` in front of it like this: `$VARIABLE_NAME`. Shell scripts run from top to bottom, so you can only use variable below where it's created. Use `echo` to print your variable.", - "hints": [ - "Add `echo $QUESTION1` at the bottom of your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "190", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "190.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "626efba75ba0d8f6cbc2ad4cdb8d492702aaaf16" - ] - }, - "content": "Run the file like you did before to see if it worked.", - "hints": [ - "Run your file by executing it", - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "200", - "title": "Add read NAME", - "summary": "", - "content": "", - "steps": [ - { - "id": "200.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "4dae6eafeb5ea31210b27998086a4fc55d023dd1" - ] - }, - "content": "The question was printed. Next, you want to be able to accept input from a user. You can do that with `read` like this: `read VARIABLE_NAME`. This will get user input and store it into a new variable. After you print the question, use `read` to get input and store it in a variable named `NAME`.", - "hints": [ - "Add `read NAME` at the bottom of your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "210", - "title": "Add echo Hello $NAME", - "summary": "", - "content": "", - "steps": [ - { - "id": "210.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "9317dd685bbefcecac158c2358b42a26b3ce76e8" - ] - }, - "content": "At the bottom of your script, use `echo` to print `Hello .` to the terminal.", - "hints": [ - "You can use your `NAME` variable like this: `$NAME`", - "Use your `$NAME` variable in place of ``", - "Don't forget the period", - "Add `echo Hello $NAME.` at the bottom of your script" - ] - } - ] - }, - { - "id": "220", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "220.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c81cb6d5774fcaedc5ead1ebe5de54e40f2c9f37" - ] - }, - "content": "Run the file again. Type your name and press enter after it asks for it.", - "hints": [ - "Run your file by executing it", - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there", - "You can press `ctrl+c` to close the program" - ] - } - ] - }, - { - "id": "230", - "title": "Add QUESTION2 variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "230.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "696078c01b4aa042cb3a918029c92cc234a1ede6" - ] - }, - "content": "Right below your first variable, create another one named `QUESTION2`. Set the value to, `Where are you from?`. Make sure to put it in double quotes.", - "hints": [ - "Here's an example: `VARIABLE=\"value\"`", - "Add `QUESTION2=\"Where are you from?\"` to your script" - ] - } - ] - }, - { - "id": "240", - "title": "Add echo $QUESTION2", - "summary": "", - "content": "", - "steps": [ - { - "id": "240.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "5a3ea50c1862b9b8f3788e29071962594904d8a8" - ] - }, - "content": "After your `read` command, use your new variable to print the next question.", - "hints": [ - "Use `echo` to print the variable", - "Add `echo $QUESTION2` below your `read` command" - ] - } - ] - }, - { - "id": "250", - "title": "Add read LOCATION", - "summary": "", - "content": "", - "steps": [ - { - "id": "250.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "eb61d4fac03be52d45c129ccf4b04ae1d64e5fb8" - ] - }, - "content": "Below where the second question is printed, use `read` to get input from the user into a variable named `LOCATION`.", - "hints": [ - "Here's an example `read VARIABLE_NAME`", - "Add `read LOCATION` to your script below `echo $QUESTION2`" - ] - } - ] - }, - { - "id": "260", - "title": "Add echo Hello $NAME from $LOCATION", - "summary": "", - "content": "", - "steps": [ - { - "id": "260.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "f113517382ddca8215e89e2d75f48b346028edf7" - ] - }, - "content": "Change the existing response to `Hello from .`.", - "hints": [ - "Use your two variables in place of `` and ` `", - "The command is `echo`, the flag is `--help`", - "Type `echo --help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "310", - "title": "man echo", - "summary": "", - "content": "", - "steps": [ - { - "id": "310.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "76aed3123c7f7636f897f35c85de07b14fa69e22" - ] - }, - "content": "That didn't work as I hoped. Another way to find information about a command is with `man`. It stands for `manual` and you can use it like this: `man `. See if there's a manual for `echo`.", - "hints": [ - "Type `man echo` in the terminal and press enter", - "Press enter until you have seen the whole menu" - ] - } - ] - }, - { - "id": "320", - "title": "Add echo -e \\n~~ Questionnaire ~~\\n", - "summary": "", - "content": "", - "steps": [ - { - "id": "320.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "7b00267cbc979d62d39392c6f6a4055ec527f4a4" - ] - }, - "content": "At the top of the menu, the `-e` option looks promising. And the `\\n` below it says `new line`. You should take a look at those. In your script, change the title to `echo -e \\n~~ Questionnaire ~~\\n` to see if that prints the empty lines.", - "hints": [ - "Change the suggested line to `echo -e \\n~~ Questionnaire ~~\\n`" - ] - } - ] - }, - { - "id": "323", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "323.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c95ec4f32a9629903aad8c0f9a0cd95c4addbc36" - ] - }, - "content": "Run it to see if it worked. You can press `ctrl+c` to close the program after it starts if you don't want to enter values.", - "hints": [ - "Run your file by executing it", - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "You can press `ctrl+c` to close the program" - ] - } - ] - }, - { - "id": "326", - "title": "Change to echo -e \"\\n~~ Questionnaire ~~\\n\"", - "summary": "", - "content": "", - "steps": [ - { - "id": "326.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "87149c5f3041ab4804bbe6acd866e2b8a9d8a2fd" - ] - }, - "content": "It didn't print the empty lines. `echo` will only print empty lines if the value is enclosed in quotes. Place double quotes around the title that gets printed to see if it works.", - "hints": [ - "Change the suggested line to `echo -e \"\\n~~ Questionnaire ~~\\n\"`" - ] - } - ] - }, - { - "id": "330", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "330.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b03cdc968e546bab177dad6ceb397427c8b13f32" - ] - }, - "content": "Run your script again to see if that fixed it.", - "hints": [ - "Run your file by executing it", - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "You can press `ctrl+c` to close the program" - ] - } - ] - }, - { - "id": "340", - "title": "Add QUESTION3 variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "340.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "041b3d5602ba49e25aa04fb54cb9875a29ae8ff9" - ] - }, - "content": "Now it's working :smile: Create a `QUESTION3` variable next to the other two, set it's value to `\"What's your favorite coding website?\"`", - "hints": [ - "Add `QUESTION3=\"What's your favorite coding website?\"` to your `questionnaire.sh` file", - "Add it by the other two variables" - ] - } - ] - }, - { - "id": "345", - "title": "echo QUESTION3 variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "345.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "e44827108d65c0c681a48a5d93561ac475bea276" - ] - }, - "content": "Use `echo` to print the third question after you `read` the `LOCATION`.", - "hints": [ - "Add `echo $QUESTION3` below the `read LOCATION`", - "Add it to your `questionnaire.sh` file" - ] - } - ] - }, - { - "id": "350", - "title": "read WEBSITE", - "summary": "", - "content": "", - "steps": [ - { - "id": "350.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "3d3cfa4d94744740d9052acd427615dc0dd7e362" - ] - }, - "content": "After the question you just printed, add code to read input into a variable named `WEBSITE`.", - "hints": [ - "Add `read WEBSITE` below the `echo $QUESTION3`" - ] - } - ] - }, - { - "id": "360", - "title": "echo final sentence", - "summary": "", - "content": "", - "steps": [ - { - "id": "360.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "b49d95cfbe45dcc3586d871b87413046c2eb0dc7" - ] - }, - "content": "Change the `echo` command of the response to print this sentence instead: `Hello from . I learned that your favorite coding website is !`.", - "hints": [ - "Replace the `echo Hello $NAME from $LOCATION.` with the suggested sentence", - "Use your three variables in place of ``, ``, and ``", - "The command should look like this: `echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE!`" - ] - } - ] - }, - { - "id": "363", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "363.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "f4da0edfe1e2f7d8f5348464e13e85022ffdfac8" - ] - }, - "content": "Run the script and enter values when the program is waiting. Let's see the final output.", - "hints": [ - "Run your file by executing it", - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "366", - "title": "Add line breaks around final sentence", - "summary": "", - "content": "", - "steps": [ - { - "id": "366.1", - "setup": { - "watchers": [ - "./questionnaire.sh" - ], - "commits": [ - "20bf7ee45f7e78ffaa9118e6ab29b34e4622e92d" - ] - }, - "content": "One last thing. Change that final response to print an empty line at the beginning of the sentence.", - "hints": [ - "Use `echo` with the `-e` flag and a new line (`\\n`) character like you did for the title", - "Don't forget to put the response in double quotes so it prints the empty line", - "Here's an example: `echo -e \"\\n\"`", - "Only add a new line at the beginning of the response, not the end", - "The final command should look like this: `echo \"\\nHello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE!\"`" - ] - } - ] - }, - { - "id": "370", - "title": "./questionnaire", - "summary": "", - "content": "", - "steps": [ - { - "id": "370.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "0ae1eb5b5e03a6fb715457867b6873fd06448b0d" - ] - }, - "content": "Run it one last time and enter values when it asks to see if you like how it looks.", - "hints": [ - "Run your file by executing it", - "Type `./questionnaire.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "380", - "title": "touch countdown.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "380.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "5032cb849673842d83bb8a44a8bcf9ab433b5b45" - ] - }, - "content": "It looks good. I think you are done with that script for now. The next program will be countdown timer. Use the `touch` command to create a new file named `countdown.sh` in your `project` folder.", - "hints": [ - "Type `touch countdown.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "390", - "title": "chmod +x countdown.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "390.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "113b93619636edfe59b5e197fa3ffb7d0ee38344" - ] - }, - "content": "Give your file executable permissions so you can run it like the other one. It's the `chmod` command with the `+x` flag.", - "hints": [ - "Here's an example `chmod `", - "The value for permissions you want to use is `+x`", - "You previously used `chmod +x questionnaire.sh`", - "Type `chmod +x countdown.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "400", - "title": "Add shebang", - "summary": "", - "content": "", - "steps": [ - { - "id": "400.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "c7d5cbab419f488c41a512e80c43d6a6f30317a7" - ] - }, - "content": "You want to use the `bash` interpreter again. Add a `shebang` at the top of your new file to denote that.", - "hints": [ - "A `shebang` looks like this: `#!`", - "Enter `which bash` in the terminal to see the path to `bash`", - "Look at the `shebang` in your first script to get the syntax", - "It should look like this: `#!/bin/bash`", - "Add `#!/bin/bash` at the top of your `countdown.sh` file" - ] - } - ] - }, - { - "id": "410", - "title": "Add comment", - "summary": "", - "content": "", - "steps": [ - { - "id": "410.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "0500487839a9afae97cd21861efca7ae74d50517" - ] - }, - "content": "Comments in `bash` look like this: `# `. Add a comment below the `shebang` that says `Program that counts down to zero from a given argument` so people know what it does. Note that the `shebang` is a special case and is not treated like a comment.", - "hints": [ - "Add `# Program that counts down to zero from a given argument` to your `countdown.sh` file" - ] - } - ] - }, - { - "id": "420", - "title": "Add echo $*", - "summary": "", - "content": "", - "steps": [ - { - "id": "420.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "32e1db7a1de7ce969dda2a3761c49b6072e6ba66" - ] - }, - "content": "Programs can take arguments. You can access them a few different ways with `$`. Add `echo $*` in your script to print all arguments passed to it.", - "hints": [ - "Add `echo $*` at the bottom of the `countdown.sh` file" - ] - } - ] - }, - { - "id": "425", - "title": "./countdown.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "425.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "71bb320aa891dbceb778798127ed754a3e321d4b" - ] - }, - "content": "Execute your script with `./countdown.sh`.", - "hints": [ - "Type `./countdown.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "430", - "title": "./countdown.sh arg1 arg2 arg3", - "summary": "", - "content": "", - "steps": [ - { - "id": "430.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "5fa0d0a01b7de4c295039cd1e5c272fbbc94709e" - ] - }, - "content": "Nothing was printed. Run your script again, but this time add three arguments to the command; `arg1`, `arg2`, and `arg3`. Place them after the command with a space before each one.", - "hints": [ - "Type `./countdown.sh arg1 arg2 arg3` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "440", - "title": "Change to echo $1", - "summary": "", - "content": "", - "steps": [ - { - "id": "440.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "1d94d313685fabdd8fd6b03f8059bb3b5511f70c" - ] - }, - "content": "`$*` printed all the arguments passed to your script. To access any one of them, use `$`. `arg2` could have been accessed with `$2`. Change your script to `echo` the first argument instead of all the arguments.", - "hints": [ - "Try running your script with an argument to make sure it’s giving the expected output", - "Use `echo $1` to print the second argument", - "Change `echo $*` to `echo $1` in your `countdown.sh` file" - ] - } - ] - }, - { - "id": "450", - "title": "./countdown.sh arg1 arg2 arg3", - "summary": "", - "content": "", - "steps": [ - { - "id": "450.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "e1a75faa8f53c223626f99acebf771a1c3d2242d" - ] - }, - "content": "Run your file with `./countdown.sh arg1 arg2 arg3` again.", - "hints": [ - "Type `./countdown.sh arg1 arg2 arg3` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "460", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "460.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "82eeaa9087911dc6abeabd96327f97f789edcc0f" - ] - }, - "content": "Now it just prints the first argument. Your program will accept an argument to count down from. You will test it with an `if` statement to make sure it's a positive integer. I wonder what that syntax would look like. Type `help` in the terminal to see if you can find anything.", - "hints": [ - "Type `help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "470", - "title": "man if", - "summary": "", - "content": "", - "steps": [ - { - "id": "470.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b4781ccf2840e5956f6af7ca998b6f9bcfa0b71d" - ] - }, - "content": "This is a list of built-in commands. You should look over it, some of them may look familiar. I see `echo` in there. Another one is `if`. See if you can find out more about it by checking its `man` page.", - "hints": [ - "Here's an example: `man `", - "Type `man if` in the terminal and press enter" - ] - } - ] - }, - { - "id": "480", - "title": "help if", - "summary": "", - "content": "", - "steps": [ - { - "id": "480.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "0399a64cbaf308de884e2131f7cec581a0e9e1b6" - ] - }, - "content": "I guess there isn't a `man` page for it. At the top of the `help` screen, I noticed you can use `help ` to find out more. Yet another way to find out about a command :disappointed_relieved: See if you can find out more about `if` with that method.", - "hints": [ - "Here's an example `help `", - "Type `help if` in the terminal and press enter" - ] - } - ] - }, - { - "id": "490", - "title": "Add if arg1 print true", - "summary": "", - "content": "", - "steps": [ - { - "id": "490.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "b4f678f4f04c58a3445de260caceb227b6f95a0b" - ] - }, - "content": "The syntax is at the top, not all of it is required. Here's another example:\n\n```sh\nif [[ CONDITION ]]\nthen\n STATEMENTS\nfi\n```\n\nRemove the `echo $1` in your script and add an `if` condition that checks `if [[ $1 == arg1 ]]`. In its `then` area, use `echo` to print `true` to the screen. There must be spaces on the inside of the brackets (`[[ ... ]]`) and around the operator (`==`).", - "hints": [ - "Make sure to remove the `echo $1`", - "Add the following to your `countdown.sh` file:\n```sh\nif [[ $1 == arg1 ]]\nthen\n echo true\nfi\n```" - ] - } - ] - }, - { - "id": "500", - "title": "./countdown arg1", - "summary": "", - "content": "", - "steps": [ - { - "id": "500.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "7c31293d270c9783270f699f15c46872bc23c043" - ] - }, - "content": "Notice that the end of the syntax is `fi` (`if` backwards). It should print `true` if you pass `arg1` to your script now. Run the script with `arg1` as the only argument.", - "hints": [ - "Type `./countdown.sh arg1` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "505", - "title": "./countdown !arg1", - "summary": "", - "content": "", - "steps": [ - { - "id": "505.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2fa29a4eac4aa6548b70ab1e6067a7233068a18b" - ] - }, - "content": "The `if` condition worked, it printed `true`. Run it again with anything except `arg1` as the first argument.", - "hints": [ - "Type `./countdown.sh arg2` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "510", - "title": "Add else print false", - "summary": "", - "content": "", - "steps": [ - { - "id": "510.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "077d2e69eb61472889781a847b4daed34675d51f" - ] - }, - "content": "Nothing was printed. One of the optional parts of `if` was an `else` area. You can use it like this:\n\n```sh\nif [[ CONDITION ]]\nthen\n STATEMENTS\nelse\n STATEMENTS\nfi\n```\n\nAdd an `else` to your existing `if` condition. Use `echo` to print `false` if the condition fails.", - "hints": [ - "Your `if` should look like this:\n```sh\nif [[ $1 == arg1 ]]\nthen\n echo true\nelse\n echo false\nfi\n```" - ] - } - ] - }, - { - "id": "520", - "title": "./countdown !arg1", - "summary": "", - "content": "", - "steps": [ - { - "id": "520.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "f08cbd81b262179420fa37578545757e7e4fed59" - ] - }, - "content": "Run the script again and use anything except `arg1` as the only argument.", - "hints": [ - "Type `./countdown.sh !arg1` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Enter `cd ~/project` in the terminal to get to the project folder if you aren't there" - ] - } - ] - }, - { - "id": "530", - "title": "Change if condition -lt 5", - "summary": "", - "content": "", - "steps": [ - { - "id": "530.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "d096be1f35e2ff0b4c9c0dfbcea20ac5dc6fcca6" - ] - }, - "content": "Now it printed `false`. Your program is expecting an integer to count down from as its argument. You can compare integers inside the brackets (`[[ ... ]]`) of your `if` with `-eq` (equal), `-ne` (not equal), `-lt` (less than), `-le` (less than or equal), `-gt` (greater than), `-ge` (greater than or equal). Change your `if` condition to check if your first argument is less than `5`.", - "hints": [ - "Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-lt`)", - "Your `if` condition should look like this: `[[ $1 -lt 5 ]]`", - "The whole `if` should look like this:\n```sh\nif [[ $1 -lt 5 ]]\nthen\n echo true\nelse\n echo false\nfi\n```" - ] - } - ] - }, - { - "id": "540", - "title": "./countdown 4", - "summary": "", - "content": "", - "steps": [ - { - "id": "540.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "4706e221bf8aecdaede18b2628d1e15b3ab739e6" - ] - }, - "content": "Run the script again and use `4` as a first argument to make sure it's working.", - "hints": [ - "Type `./countdown.sh 4` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "542", - "title": "./countdown 5", - "summary": "", - "content": "", - "steps": [ - { - "id": "542.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "d45b629f2cd6537934d11e597a18b3905c7fefb9" - ] - }, - "content": "It printed `true` since your argument was less than `5`. Run it again with `5` as the argument.", - "hints": [ - "Type `./countdown.sh 5` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "544", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "544.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "08667189e830410e95089ae3c6e3fc4244c87de5" - ] - }, - "content": "As expected, that printed `false`. Take a look at that `help` menu again. I want to see if we can find out more about how these expressions work.", - "hints": [ - "Type `help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "546", - "title": "help [[ expression ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "546.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c06a25db53e789394a6ddb22c0f223c502f28764" - ] - }, - "content": "Near the top left, it says `[[ expression ]]`. Those look like the double brackets you are using. See if you can get more info about that with the `help` command like you did with `help if`.", - "hints": [ - "Here's an example: `help `", - "Type `help [[ expression ]]` or `help [[` in the terminal and press enter" - ] - } - ] - }, - { - "id": "548", - "title": "help test", - "summary": "", - "content": "", - "steps": [ - { - "id": "548.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "829f403738dee7080c0c6713a8cead655f1a4ea3" - ] - }, - "content": "It might not be a bad idea to read that. Looks like you can use some, probably familiar, things like `!`, `&&`, and `||` to compare multiple expressions. There's also `==` and `!=` operators for an individual expression. It says something about the `test` built-in command. See if you can bring up the `help` menu for that.", - "hints": [ - "View the `help` menu of the suggested command like you did for the `help if`", - "Here's an example: `help `", - "Type `help test` in the terminal and press enter" - ] - } - ] - }, - { - "id": "550", - "title": "Change if to [[ $1 -le 5 ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "550.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "bc067a2b68e76d0ed4d5a15aacf17b7590c2f6c3" - ] - }, - "content": "That's what I was looking for. At the top are some file operators. There's some string and other operators as well. You should take a look at them. Near the bottom, are the arithmetic operators you used with your `if` condition. Change the condition in your script to check if the first argument is less than or equal to `5`.", - "hints": [ - "The `if` condition should look like this: `[[ $1 -le 5 ]]`", - "Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-le`)", - "It's the `if` in your `countdown.sh` file" - ] - } - ] - }, - { - "id": "552", - "title": "./countdown 5", - "summary": "", - "content": "", - "steps": [ - { - "id": "552.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b686a939bd425e40d9d0a653b39c3e2db7844ec3" - ] - }, - "content": "Run the script and use `5` as a first argument again.", - "hints": [ - "Type `./countdown.sh 5` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "554", - "title": "[[ 4 -le 5 ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "554.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "d4f02b901417c94206bcb71fa80fb102bb4246bb" - ] - }, - "content": "Now it prints `true`. Remember I said any command can run in the terminal or a script. Try running an expression right in the terminal by entering `[[ 4 -le 5 ]]` in it.", - "hints": [ - "Enter the suggested expression in the terminal", - "Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-le`)", - "Type `[[ 4 -le 5 ]]` in the terminal and press enter" - ] - } - ] - }, - { - "id": "556", - "title": "echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "556.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ed94e2aff2d7efb90f27b6a985cb6562dd0ff480" - ] - }, - "content": "Nothing happened? Each command has an exit status that can be accessed with `$?`. View the exit status of the **last command** with `echo $?`.", - "hints": [ - "Type `echo $?` in the terminal and press enter", - "Your second to last command should be `[[ 4 -le 5 ]]`. So enter that before `echo $?`" - ] - } - ] - }, - { - "id": "558", - "title": "[[ 4 -ge 5 ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "558.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "257edd9f345de90e8ab18b2f4c0782aa1c73a3c5" - ] - }, - "content": "The exit status of `0` means it was true, `4` is indeed less or equal to `5`. Try it again with `[[ 4 -ge 5 ]]`.", - "hints": [ - "Enter the suggested expression in the terminal", - "Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-ge`)", - "Type `[[ 4 -ge 5 ]]` in the terminal and press enter" - ] - } - ] - }, - { - "id": "560", - "title": "echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "560.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "55ab86cb5207d4c47dd485204e36f88e6e42f527" - ] - }, - "content": "Use `echo` to view the exit status of the command you just entered.", - "hints": [ - "Type `echo $?` in the terminal and press enter", - "Your second to last command should be `[[ 4 -ge 5 ]]`. So enter that right before `echo $?`" - ] - } - ] - }, - { - "id": "562", - "title": "[[ 4 -ge 5 ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "562.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c330e8ae81ef028e424b1300519deefdd57861f6" - ] - }, - "content": "It printed `1` this time for false. You can separate commands on a single line with `;`. Enter your last two commands on one line like this: `[[ 4 -ge 5 ]]; echo $?`. It will run the expression, then print the exit status of it since it was the last command.", - "hints": [ - "Make sure there's spaces inside the brackets (`[[ ... ]]`) and around the operator (`-ge`)", - "Type `[[ 4 -ge 5 ]]; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "564", - "title": "[[ 10 -ne 5 ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "564.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "f8d172acfa090a77f4d686f980f68eb980f2d6c3" - ] - }, - "content": "It's still false. Using the same syntax of `[[ ... ]]; echo$?`, check if `10` is not equal to `5` and print the exit status of the expression on one line.", - "hints": [ - "Check the `help test` menu to find the `not equal` operator", - "It's the `-ne` operator", - "You previously used `[[ 4 -ge 5 ]]; echo $?`", - "Make sure there's spaces inside the brackets and around the operator", - "Type `[[ 10 -ne 5 ]]; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "566", - "title": "bad_command; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "566.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "8c66e3e4082e5c8fced897708d8b0980b2ad8a9b" - ] - }, - "content": "You can think of an exit status of `0` as true. But it means that the command had zero errors. All commands have an exit status. Using the same syntax, enter `bad_command;` and check its exit status on a single line.", - "hints": [ - "The syntax looks like this: `; echo $?`", - "You previously used `[[ 10 -ne 5 ]]; echo $?`", - "Type `bad_command; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "568", - "title": "ls; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "568.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "63fc31a6ff66f209309e180cf58eb6e14bcf8076" - ] - }, - "content": "`command not found`, with an exit status of `127`. Anything but `0` means there was an error with the command. `bad_command` didn't exist. Try it again with `ls`.", - "hints": [ - "Use the same syntax you have been using", - "Here's an example `; echo $?`", - "You previously used `bad_command; echo $?`", - "Type `ls; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "570", - "title": "ls -y; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "570.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "e377095821bf677c401985c5292fc3f4f1d9ed9e" - ] - }, - "content": "The command executed as expected and there were zero errors. So it gave you an exit status of `0`. Try it again with `ls -y`.", - "hints": [ - "Use the same syntax you have been using", - "Here's an example: `; echo $?`", - "You previously used `ls; echo $?`", - "Type `ls -y; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "572", - "title": "help test", - "summary": "", - "content": "", - "steps": [ - { - "id": "572.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c586c030659c56b99f1cad4a227e1fa264967626" - ] - }, - "content": "The `-y` flag doesn't work with `ls` so it gave you an exit status other than `0`, meaning that the command was unsuccessful. View the `help` menu of the `test` command again, I want to see what else is in that list.", - "hints": [ - "Here's an example: `help `", - "Type `help test` in the terminal and press enter" - ] - } - ] - }, - { - "id": "574", - "title": "[[ -a countdown.sh ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "574.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "fda649ff2984edc083d2dd2f4921b405fd6200c7" - ] - }, - "content": "You tried a few of the arithmetic operators, those work for integers. Try one of the file operators. The first one on the list checks if a file exists. Type `[[ -a countdown.sh ]]; echo $?` in the terminal to see if your file exists.", - "hints": [ - "Enter the suggested commands in the terminal", - "Type `[[ -a countdown.sh ]]; echo $?` in the terminal and press enter", - "Don't forget the spaces inside the brackets", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "575", - "title": "[[ -a bad_file.txt ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "575.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "eaec2237be298f4f5877c3853ae11db6be4aac64" - ] - }, - "content": "The file must exist. It's checking the folder the command is entered from. Try it again with `bad_file.txt`.", - "hints": [ - "Use the same syntax you have been using", - "Here's an example: `; echo $?`", - "You previously used `[[ -a countdown.sh ]]; echo $?`", - "Type `[[ -a bad_file.txt ]]; echo $?` in the terminal and press enter", - "Don't forget the spaces inside the brackets" - ] - } - ] - }, - { - "id": "576", - "title": "[[ -x countdown.sh ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "576.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "26e5ec03be605f844d852d8f56ddcd9b4295de13" - ] - }, - "content": "`bad_file.txt` doesn't exist. I think you're getting the hang of this. Using the same syntax, check if you have permissions to execute your `countdown.sh` file. You may want to look at that menu again.", - "hints": [ - "View the `help test` menu to find the file operator for checking if a file is executable by you", - "It's the `-x` operator", - "The syntax you want is `[[ ... ]]; echo $?` to see if the condition is true", - "Don't forget the spaces inside the brackets", - "Type `[[ -x countdown.sh ]]; echo $?` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "582", - "title": "help [[ expression ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "582.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "163f74988205a92952f1b196e3b20daddd2ad5d1" - ] - }, - "content": "You played around with a number of the expressions. View the `help [[ expression ]]` menu again that you looked at before to see a few more options. You can view the menu with just `help [[`.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `help [[ expression ]]` or `help [[` in the terminal and press enter" - ] - } - ] - }, - { - "id": "584", - "title": "[[ -x countdown.sh && 5 -le 4 ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "584.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "3d3c2892f160c8f51590b1beb629316c81736c13" - ] - }, - "content": "As I mentioned before, you can test multiple expressions with `&&` and `||`. Enter `[[ -x countdown.sh && 5 -le 4 ]]; echo $?` in the terminal to test the file is executable by you **and** five is less than or equal to four.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `[[ -x countdown.sh && 5 -le 4 ]]; echo $?` in the terminal and press enter", - "Make sure there's spaces around the brackets and all the operators" - ] - } - ] - }, - { - "id": "586", - "title": "[[ -x countdown.sh || 5 -le 4 ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "586.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "3d966920ad3e23d5d30ea807ef7520f12498e6bf" - ] - }, - "content": "Both conditions weren't true, so the exit status was `1` for `false`. Try testing the same two conditions with the `or` operator.", - "hints": [ - "Modify this `[[ -x countdown.sh && 5 -le 4 ]]; echo $?` with the suggestion and enter it in the terminal", - "Use the `or` operator from the `help [[ expression ]]` menu", - "The `or` operator is `||`", - "Type `[[ -x countdown.sh || 5 -le 4 ]]; echo $?` in the terminal and press enter", - "Make sure there's spaces around the brackets and all the operators" - ] - } - ] - }, - { - "id": "588", - "title": "Change if to [[ $1 -gt 0 ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "588.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "22640e91bb5ec9c298e7cb6cc0693ef795dbeb1d" - ] - }, - "content": "One of the conditions was true so it printed `0`. I think that's enough of a detour. Back in your script, change the `if` condition to check if the first argument is **greater than zero** so you can be sure it's something you can count down from.", - "hints": [ - "Use the `-gt` operator in your `if` condition", - "The `if` condition should look like this: `[[ $1 -gt 0 ]]`", - "It's in the `countdown.sh` file" - ] - } - ] - }, - { - "id": "590", - "title": "Change if !# message", - "summary": "", - "content": "", - "steps": [ - { - "id": "590.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "c2630e5685a4f1b2ee241041df7a7fd1f075a0b6" - ] - }, - "content": "The condition you added checks if a positive integer was passed as an argument to the script and executes the `then` area. Change the existing `echo` command to print `Include a positive integer as the first argument.` if a positive integer is not used.", - "hints": [ - "The `else` area should look like this: `echo Include a positive integer as the first argument.`", - "The whole `if` condition should look like this:\n```sh\nif [[ $1 -gt 0 ]]\nthen\n echo true\nelse\n echo Include a positive integer as the first argument.\nfi\n```" - ] - } - ] - }, - { - "id": "600", - "title": "./countdown 1", - "summary": "", - "content": "", - "steps": [ - { - "id": "600.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "e2e2e7be210c64523265a3ee75c2ee87227a219f" - ] - }, - "content": "Run your script and use `1` as a first argument to make sure the condition is working.", - "hints": [ - "Type `./countdown.sh 1` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "610", - "title": "./countdown 0", - "summary": "", - "content": "", - "steps": [ - { - "id": "610.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "601e8acaa39e0975040dca2272ef1b07fe26bc3a" - ] - }, - "content": "Run it again and use anything but a positive integer as the only argument.", - "hints": [ - "Type `./countdown.sh 0` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "615", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "615.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "63b26df4d1981b82aec6b472525cb3f6439d8929" - ] - }, - "content": "Looks like your `if` condition is working. Next, you want to loop over the argument and count down to zero from it. Check the `help` menu to see if there's any commands for this.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "620", - "title": "Add for loop for countdown", - "summary": "", - "content": "", - "steps": [ - { - "id": "620.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "153928d689ffe4dad123e110a15c58fb9d737717" - ] - }, - "content": "There's two `for` loops in there, you want the second one. Here's an example:\n\n```sh\nfor (( i = 10; i > 0; i-- ))\ndo\n echo $i\ndone\n```\n\nThe above creates a variable (`i = 10`), then prints it, subtracts one, and repeats until `i` is not greater than `0`. So it prints `10` through `1`. In the `then` area of your condition, replace the `echo` with a `for` loop that prints from the argument (`$1`) to `1`.", - "hints": [ - "Set the variable to the value of your argument (`$1`) initially", - "Use the same syntax as the example except change the `10` to `$1`", - "Don't include any extra commands in the `then` area", - "Your `then` area should look like this:\n```sh\nfor (( i = $1; i > 0; i-- ))\ndo\n echo $i\ndone\n```", - "The whole `if` condition should look like this:\n```sh\nif [[ $1 -gt 0 ]]\nthen\n for (( i = $1; i > 0; i-- ))\n do\n echo $i\n done\nelse\n echo Include a positive integer as the first argument.\nfi\n```" - ] - } - ] - }, - { - "id": "630", - "title": "./countdown 10", - "summary": "", - "content": "", - "steps": [ - { - "id": "630.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "06895b6ab56b83650651c8efcb03dd67930bba1f" - ] - }, - "content": "Run your script and use `10` as the first argument.", - "hints": [ - "Type `./countdown.sh 10` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "640", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "640.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2fbbdda735d2d4082d5cee253d36f228472f10ec" - ] - }, - "content": "It works :smile: But I want it to pause for one second between each number. Check the `help` menu again to see if there's any commands that might help.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "650", - "title": "ls /", - "summary": "", - "content": "", - "steps": [ - { - "id": "650.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "4deeb938ad53ac2ffcd2cff5eaf5405244b183bc" - ] - }, - "content": "I'm not seeing the command I was hoping to. These are the built-in commands, where are the rest? Type `ls /` to look around.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `ls /` in the terminal and press enter" - ] - } - ] - }, - { - "id": "660", - "title": "ls /bin", - "summary": "", - "content": "", - "steps": [ - { - "id": "660.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "966e3045d6e18ce9af6770b0d91e7ad944177b04" - ] - }, - "content": "The `/` listed what's in the root of the file system. I see a `bin` folder, `bin` stands for `binary`. View what's in it with `ls /bin`.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `ls /bin` in the terminal and press enter" - ] - } - ] - }, - { - "id": "670", - "title": "man sleep", - "summary": "", - "content": "", - "steps": [ - { - "id": "670.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "0982916478e22aae338712d442262654e707bb41" - ] - }, - "content": "These are some non built-in commands. There's quite a few that should look familiar. One is `bash`, that's the one you used for the `shebang` in your scripts. I see one called `sleep`. View the manual of it.", - "hints": [ - "View a manual with the `man` command", - "Here's an example: `man `", - "Enter `man sleep` in the terminal", - "Press enter until you have seen the whole menu" - ] - } - ] - }, - { - "id": "675", - "title": "sleep 3", - "summary": "", - "content": "", - "steps": [ - { - "id": "675.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "270e7b2e46e772a1e638f96506afd2bea6af2515" - ] - }, - "content": "At the top, it says you can pause execution for a number of seconds. Try it out by entering `sleep 3` in the terminal.", - "hints": [ - "Enter the suggested command in the terminal", - "Enter `sleep 3` in the terminal" - ] - } - ] - }, - { - "id": "680", - "title": "Add sleep to for loop", - "summary": "", - "content": "", - "steps": [ - { - "id": "680.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "8e337b8eea97cd1853de8ce1a3ad74796cd26237" - ] - }, - "content": "That should work. In your `for` loop, use `sleep` to make the script pause for `1` second after each number is printed.", - "hints": [ - "Add the suggestion to the `for` loop in your `countdown.sh` file", - "Add `sleep 1` after you print `i` in your `for` loop" - ] - } - ] - }, - { - "id": "690", - "title": "./countdown 3", - "summary": "", - "content": "", - "steps": [ - { - "id": "690.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "caeacb82ada82d86f42e27fe3b165f64ff2a436f" - ] - }, - "content": "Run your script and use `3` as the first argument.", - "hints": [ - "Type `./countdown.sh 3` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "692", - "title": "Change to >=", - "summary": "", - "content": "", - "steps": [ - { - "id": "692.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "06c6d8ebbb5264303f833c6214147e02c190af3c" - ] - }, - "content": "Awesome. Except it should print `0` instead of stopping at `1`. Change the condition in your for loop so that it checks for `i >= 0`.", - "hints": [ - "Your `for` loop should look like this:\n```sh\nfor (( i = $1; i >= 0; i-- ))\ndo\n echo $i\n sleep 1\ndone\n```", - "The whole `if` condition should look like this:\n```sh\nif [[ $1 -gt 0 ]]\nthen\n for (( i = $1; i >= 0; i-- ))\n do\n echo $i\n sleep 1\n done\nelse\n echo Include a positive integer as the first argument.\nfi\n```" - ] - } - ] - }, - { - "id": "694", - "title": "./countdown 3", - "summary": "", - "content": "", - "steps": [ - { - "id": "694.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "95ada381bd7ff967d1151b087f5d3feded386f37" - ] - }, - "content": "Run your script with `3` as the argument again.", - "hints": [ - "Type `./countdown.sh 3` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "696", - "title": "Add echo -e \"title\"", - "summary": "", - "content": "", - "steps": [ - { - "id": "696.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "d2af9b9ed136a65f744fd37f82b434ba320b4307" - ] - }, - "content": "Excellent. I want it to display a title like the other script. Make it so that it prints `~~ Countdown Timer ~~` before anything else. Include a new line before and after it like you did for the other title.", - "hints": [ - "Use the `echo` command with the `-e` flag and the new line (`\\n`) character", - "Make sure to place the message in double quotes", - "Here's an example: `echo -e \"\\n\\n\"`", - "Add `echo -e \"\\n~~ Countdown Timer ~~\\n\"` to the `countdown.sh` file after the comment" - ] - } - ] - }, - { - "id": "698", - "title": "./countdown 1", - "summary": "", - "content": "", - "steps": [ - { - "id": "698.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b83ee9759fb2ebe27a3480dceaff3aac8569923a" - ] - }, - "content": "Run your script and use `1` as the first argument again to see the title.", - "hints": [ - "Type `./countdown.sh 1` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "700", - "title": "Add Multiline comment", - "summary": "", - "content": "", - "steps": [ - { - "id": "700.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "87f15f0086a2fce2eeaacb3b63a8978bb78d8030" - ] - }, - "content": "This is fun. You can create a multiline comment like this:\n\n```sh\n: '\n comment here\n more comment here\n'\n```\n\nComment out your `for` loop with a multiline comment. I want to try and do this with a `while` loop.", - "hints": [ - "Comment out the `for` loop in your `countdown.sh` file with a multiline comment", - "Make sure there's a space between the `:` and `'`", - "Your `for` loop should look like this:\n```sh\n: '\nfor (( i = $1; i >= 0; i-- ))\ndo\n echo $i\n sleep 1\ndone\n'\n```" - ] - } - ] - }, - { - "id": "710", - "title": "help while", - "summary": "", - "content": "", - "steps": [ - { - "id": "710.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "4599e7a4a9a85c6fe9461b7c6aea228c5d63d277" - ] - }, - "content": "View the `help` menu for the `while` command to see if you can find anything.", - "hints": [ - "Here's an example: `help `", - "Enter `help while` in the terminal" - ] - } - ] - }, - { - "id": "730", - "title": "Add I variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "730.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "9315b578a4dbe0083d390df034f752fe1eb032a9" - ] - }, - "content": "It shows the syntax. First, below your comment, create a variable named `I` that is set to the value of your first argument. It will start there, then on each iteration of the `while` loop you can subtract `1` from it until it reaches `0`.", - "hints": [ - "Add `I=$1` in the `then` area of your `if` statements below the multi-line comment", - "The `then` area should look like this:\n```sh\n: '\nfor (( i = $1; i >= 0; i-- ))\ndo\n echo $i\n sleep 1\ndone\n'\nI=$1\n```" - ] - } - ] - }, - { - "id": "740", - "title": "Add while loop", - "summary": "", - "content": "", - "steps": [ - { - "id": "740.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "062b65a7f785bf25323de3d615ebace691d51461" - ] - }, - "content": "The menu showed that you can make a `while` loop like this:\n\n```sh\nwhile [[ CONDITION ]]\ndo\n STATEMENTS\ndone\n```\n\nAdd a `while` loop below the `I` variable you made. The condition should be `$I -ge 0` and you should `echo` the `I` variable in the `do` statements.", - "hints": [ - "Your `while` loop should look like this:\n```sh\nwhile [[ $I -ge 0 ]]\ndo\n echo $I\ndone\n```" - ] - } - ] - }, - { - "id": "750", - "title": "Add (( I-- ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "750.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "67371e0bce2df565e43da71d7a6c92fa6773d605" - ] - }, - "content": "`I` never changes here, so you would have an infinite loop. You can subtract one from `I` with double parenthesis (`((...))`) and the `--` operator. In your while loop, add `(( I-- ))` after you `echo $I` to subtract one from `I` on each pass.", - "hints": [ - "Your `while` loop should look like this:\n```sh\nwhile [[ $I -ge 0 ]]\ndo\n echo $I\n (( I-- ))\ndone\n```" - ] - } - ] - }, - { - "id": "760", - "title": "Add sleep 1", - "summary": "", - "content": "", - "steps": [ - { - "id": "760.1", - "setup": { - "watchers": [ - "./countdown.sh" - ], - "commits": [ - "2fe0dd3702f25f06277e9442bdeba653b869eb5f" - ] - }, - "content": "The last thing to do is to add the `sleep` again. In your `while` loop, add the code to make it `sleep` for `1` second. Add the code after the `(( I-- ))`.", - "hints": [ - "Use the same `sleep 1` you used in the `for` loop", - "Your `while` loop should look like this:\n```sh\nwhile [[ $I -ge 0 ]]\ndo\n echo $I\n (( I-- ))\n sleep 1\ndone\n```" - ] - } - ] - }, - { - "id": "770", - "title": "./countdown.sh 5", - "summary": "", - "content": "", - "steps": [ - { - "id": "770.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "21977228375865c92b1e94dc37007afe0c7d6af8" - ] - }, - "content": "Run the script and use 5 as the first argument.", - "hints": [ - "Type `./countdown.sh 5` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "780", - "title": "touch bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "780.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "63bd37392b44ad4be26ba2a1523b2b539eb100a5" - ] - }, - "content": "I think the countdown timer is finished. Feel free to try it with some other arguments. The next one is a bingo number generator. Use `touch` to create `bingo.sh` in the same folder as the others.", - "hints": [ - "Type `touch bingo.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "790", - "title": "chmod +x bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "790.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "6151a29d58e2774c504e231e8cae4a1a91cfc874" - ] - }, - "content": "Give your file executable permissions like you did for the other two.", - "hints": [ - "Use the `chmod` command with the `+x` flag", - "Here's an example `chmod `", - "You previously used `chmod +x countdown.sh`", - "Type `chmod +x bingo.sh` in the terminal and press enter" - ] - } - ] - }, - { - "id": "800", - "title": "Add shebang", - "summary": "", - "content": "", - "steps": [ - { - "id": "800.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "0fbdb1bb455d10df9a4ebe2b64ba21cd4973b4ca" - ] - }, - "content": "Add a `shebang` at the top of your new script. It should use `bash` again like other two.", - "hints": [ - "A `shebang` looks like this: `#!`", - "Enter `which bash` in the terminal to see the path to `bash`", - "Look at the `shebang` in one of your other scripts to get the syntax", - "It should look like this: `#!/bin/bash`", - "Add `#!/bin/bash` at the top of your `bingo.sh` file" - ] - } - ] - }, - { - "id": "810", - "title": "Add comment", - "summary": "", - "content": "", - "steps": [ - { - "id": "810.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "b43741774376fc6a74bbd3f339293e7802e06121" - ] - }, - "content": "Add a comment below the `shebang` that says, `Bingo Number Generator`.", - "hints": [ - "Comments look like this: `# `", - "Add `#Bingo Number Generator` below the `shebang`", - "Capitalization matters" - ] - } - ] - }, - { - "id": "815", - "title": "Add echo -e \"title\"", - "summary": "", - "content": "", - "steps": [ - { - "id": "815.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "dd08de0c34a05bf03dabd2fe8928caed4ec60366" - ] - }, - "content": "Before I forget, use a single `echo` command to print a title for this program. It should say `~~ Bingo Number Generator ~~` with an empty line before and after it.", - "hints": [ - "Use the `echo` command with the `-e` flag and the new line (`\\n`) character", - "Don't forget the double quotes when using a new line character", - "Take a look at one of the title's from a previous file for a hint", - "Here's an example: `echo -e \"\\n\\n\"`", - "You previously used `echo -e \"\\n~~ Countdown Timer ~~\\n\"`", - "Add `echo -e \"\\n~~ Bingo Number Generator ~~\\n\"` below the comment of your `bingo.sh` file" - ] - } - ] - }, - { - "id": "817", - "title": "Add NUMBER=5 variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "817.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "4205be99b9b99e39d4aa59626de92ab354e903a4" - ] - }, - "content": "In your script, create a `NUMBER` variable that equals `5`.", - "hints": [ - "Here's an example: `VARIABLE_NAME=VALUE`", - "Add `NUMBER=5` to the bottom of your `bingo.sh` file" - ] - } - ] - }, - { - "id": "818", - "title": "echo $NUMBER", - "summary": "", - "content": "", - "steps": [ - { - "id": "818.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "8de808502afb1077fa7eacf13d884fa3d4ce4bd3" - ] - }, - "content": "Below your new variable, use `echo` to print it to the screen.", - "hints": [ - "Here's an example: `echo $`", - "Use `NUMBER` in place of ``", - "Add `echo $NUMBER` at the bottom of your `bingo.sh` file" - ] - } - ] - }, - { - "id": "819", - "title": "./bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "819.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "5ded15186d851d102bed32079e4faf5f360de83c" - ] - }, - "content": "Run the script by executing it.", - "hints": [ - "Type `./bingo.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "820", - "title": "printenv", - "summary": "", - "content": "", - "steps": [ - { - "id": "820.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "fe997bdd726486d4ef3dfb39e0b79044c0e50c52" - ] - }, - "content": "The numbers in bingo go up to 75, each number has a letter from the word `bingo` associated with it. You will need to randomly generate a number between 1 and 75. Bash may have something that can help you here. A shell comes with environment variables. View them by entering `printenv` in the terminal.", - "hints": [ - "Type `printenv` in the terminal and press enter" - ] - } - ] - }, - { - "id": "822", - "title": "echo $LANG", - "summary": "", - "content": "", - "steps": [ - { - "id": "822.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "8820243355ad8a1fd92d879669abe1bc92a93a6c" - ] - }, - "content": "These are all environment variables, they are predefined and loaded with each shell. Most of them aren’t very relevant, but it’s nice to know they’re there. One of them is `LANG`. Use `echo` to print it in the terminal.", - "hints": [ - "Here's an example: `echo $`", - "Type `echo $LANG` in the terminal and press enter" - ] - } - ] - }, - { - "id": "824", - "title": "declare -p", - "summary": "", - "content": "", - "steps": [ - { - "id": "824.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "161835a7c5d0ca9af25b5e1435d2717d04d01b5b" - ] - }, - "content": "View all variables in the shell with `declare -p`. `-p` stands for `print`", - "hints": [ - "Type `declare -p` in the terminal and press enter" - ] - } - ] - }, - { - "id": "826", - "title": "echo $RANDOM", - "summary": "", - "content": "", - "steps": [ - { - "id": "826.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "850aba902019cf443232dd772113454fcf192991" - ] - }, - "content": "This list includes all the environment variables, and any others that may have been created in the current shell. There's one named `RANDOM`. Use `echo` to print it in the terminal.", - "hints": [ - "Here's an example: `echo $`", - "Type `echo $RANDOM` in the terminal and press enter" - ] - } - ] - }, - { - "id": "828", - "title": "Change to NUMBER=$RANDOM", - "summary": "", - "content": "", - "steps": [ - { - "id": "828.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "6f6ed3f4a49a45c0d6b32dfa85d321578de9a81f" - ] - }, - "content": "Back in your script, use the `RANDOM` variable to set `NUMBER` to a random number instead of `5`.", - "hints": [ - "Change `NUMBER=5` to `NUMBER=$RANDOM`" - ] - } - ] - }, - { - "id": "830", - "title": "./bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "830.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "4c91112db14750f8befec9a5d39f58809f17efa0" - ] - }, - "content": "Run the script a few times in a row to make sure it's working.", - "hints": [ - "Type `./bingo.sh` in the terminal and press enter two times in a row", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "835", - "title": "Change to NUMBER=$RANDOM%75", - "summary": "", - "content": "", - "steps": [ - { - "id": "835.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "2771e94a66c89a972fbbdc899e7d1b9d72b9eb67" - ] - }, - "content": "The `RANDOM` variable will generate a random number between 0 and 32767. You can use the `modulus` operator to make it in the range you want. In your script, change the `NUMBER` variable to `$RANDOM%75`.", - "hints": [ - "Change `NUMBER=$RANDOM` to `NUMBER=$RANDOM%75`" - ] - } - ] - }, - { - "id": "840", - "title": "./bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "840.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "44f4eb65480138164cdf2a29455b87942f268801" - ] - }, - "content": "Run the script again.", - "hints": [ - "Type `./bingo.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "881", - "title": "I=0", - "summary": "", - "content": "", - "steps": [ - { - "id": "881.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "6283e4deccce80d243265e0de666dc964accb096" - ] - }, - "content": "Bash sees everything as a string so it just printed the `%75` part literally. In the terminal, create an `I` variable equal to `0` (zero), so you can play with it and figure out how to do some calculations.", - "hints": [ - "Type `I=0` in the terminal and press enter" - ] - } - ] - }, - { - "id": "884", - "title": "echo $I", - "summary": "", - "content": "", - "steps": [ - { - "id": "884.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "488f91ab385bcfc1963698db1e13a3e84002a4e0" - ] - }, - "content": "In the terminal, use `echo` to print your new variable.", - "hints": [ - "Here's an example: `echo $`", - "Type `echo $I` in the terminal and press enter" - ] - } - ] - }, - { - "id": "887", - "title": "(( I++ ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "887.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "dac2cfacde326c2dd97336c3dff0c9d6ff10bb76" - ] - }, - "content": "I noticed that you used double parenthesis in the `while` loop of your countdown timer to subtract one from `I`. Type `(( I++ ))` in the terminal to see if anything happens.", - "hints": [ - "Type `(( I++ ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "890", - "title": "echo $I", - "summary": "", - "content": "", - "steps": [ - { - "id": "890.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "442feb2fe71b44fff9ebd1f364c7f563bdbe11f3" - ] - }, - "content": "There was no output. Use `echo` to print `I` in the terminal again.", - "hints": [ - "Type `echo $I` in the terminal and press enter" - ] - } - ] - }, - { - "id": "891", - "title": "help let", - "summary": "", - "content": "", - "steps": [ - { - "id": "891.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "f9d85ebbfc76781810adae611c06841ee59391a0" - ] - }, - "content": "The double parenthesis performed the calculation, changing the value of `I` from `0` to `1`. Enter `help let` in the terminal to see the operators you can use with the double parenthesis.", - "hints": [ - "Type `help let` in the terminal and press enter" - ] - } - ] - }, - { - "id": "893", - "title": "(( I += 10 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "893.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b3b079b976139e42d6fcbf686037ad70cccb3f5b" - ] - }, - "content": "You used several of these now, including in the `for` loop from the countdown timer. Enter `(( I += 10 ))` in the terminal to increment `I` by `10`. Note that you don't need to prepend variables with `$` inside these parenthesis.", - "hints": [ - "Type `(( I += 10 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "896", - "title": "echo $I", - "summary": "", - "content": "", - "steps": [ - { - "id": "896.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "11f648d986767bbf9db1936508987f760d761df5" - ] - }, - "content": "Use `echo` to print your `I` variable again.", - "hints": [ - "Type `echo $I` in the terminal and press enter." - ] - } - ] - }, - { - "id": "897", - "title": "$(( I + 4 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "897.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "9db7402e34a7c0d3a739a661fce15dd8e2695a3c" - ] - }, - "content": "It should have printed `11` for the value of `I`. Using the double parenthesis like you have been is good for changing variable values or making comparisons. It makes the calculation in place and provides no output. If you want to make a calculation and do something with the result, add a `$` in front like this: `$(( ... ))`. Type `$(( I + 4 ))` in the terminal to see what happens.", - "hints": [ - "If it didn't print `11` for `I`, enter `I=11` to set it to `11`", - "Type `$(( I + 4 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "899", - "title": "echo $(( I + 4 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "899.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "5bca8205c10de727ccb9f948d101b65085ef06c4" - ] - }, - "content": "It should say, `bash: 15: command not found`. It replaced the command with the result of the calculation. Effectively, trying to run `15` as a command. Enter the same command, but put `echo` in front of it. The command was `$(( I + 4 ))`", - "hints": [ - "Type `echo $(( I + 4 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "902", - "title": "echo $I", - "summary": "", - "content": "", - "steps": [ - { - "id": "902.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ad012e0eb5dabae4827fe8eaa3a24559e70dd432" - ] - }, - "content": "Again, it replaced the calculation with the result. So it was basically the same as if you entered `echo 15`. Use `echo` to print `I` to the screen again.", - "hints": [ - "Type `echo $I` in the terminal and press enter" - ] - } - ] - }, - { - "id": "905", - "title": "J=$(( I - 6 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "905.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "0b819edbbee7321be24d9154f417ba6d7ecd9e3d" - ] - }, - "content": "It should still have printed `11` for `I`. See the hints if it didn't. These double parenthesis with a `$` are how you can assign a variable to some calculation. In the terminal, create a `J` variable, and use the `$(( ... ))` syntax to set its value to `I - 6`.", - "hints": [ - "If it didn't print `11` for `I`, enter `I=11` to set it to `11`", - "Type `J=$(( I - 6 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "908", - "title": "echo $J", - "summary": "", - "content": "", - "steps": [ - { - "id": "908.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "dd425c2afee492516d0070525d328a53021c642a" - ] - }, - "content": "Use `echo` to print `J`.", - "hints": [ - "Here's an example: `echo $`", - "Type `echo $J` in the terminal and press enter" - ] - } - ] - }, - { - "id": "911", - "title": "echo $(( J * 5 + 25 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "911.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "88fdb9cfc32a35d91992bf0513d56f535e21c9db" - ] - }, - "content": "`J` should equal `5`. For some more practice, use `echo` to print the value `J * 5 + 25`.", - "hints": [ - "Type `echo $(( J * 5 + 25 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "912", - "title": "echo $J", - "summary": "", - "content": "", - "steps": [ - { - "id": "912.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2afb433302f7e0bf44bf1e197b6256ee7feecd74" - ] - }, - "content": "It should have printed `50`. Print `J` with `echo` again.", - "hints": [ - "Here's an example: `echo $`", - "Type `echo $J` in the terminal and press enter" - ] - } - ] - }, - { - "id": "913", - "title": "declare -p", - "summary": "", - "content": "", - "steps": [ - { - "id": "913.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "a05d0b6b4bc0ad590ac8edbb4602b69214050691" - ] - }, - "content": "So, as a reminder, `(( ... ))` will perform a calculation or operation and output nothing. `$(( ... ))` will replace the calculation with the result of it. You made a few variables in this shell, view them with `declare -p`.", - "hints": [ - "Type `declare -p` in the terminal and press enter" - ] - } - ] - }, - { - "id": "914", - "title": "declare -p J", - "summary": "", - "content": "", - "steps": [ - { - "id": "914.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b51bfc19e11bd22b9881944f8e9932289a68f263" - ] - }, - "content": "`declare` can be used to create variables, but you are just going to use it to view them for now. If you scroll up a little, you should find your `I` and `J` variables in there. View `J` with `declare -p J`.", - "hints": [ - "Type `declare -p J` in the terminal and press enter" - ] - } - ] - }, - { - "id": "916", - "title": "declare -p RANDOM", - "summary": "", - "content": "", - "steps": [ - { - "id": "916.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "cb74d3bebe8f7340de49c72efc41f43f9969bc23" - ] - }, - "content": "I saw `RANDOM` in that list, too. View it with `declare -p ` like you did for `J`.", - "hints": [ - "Type `declare -p RANDOM` in the terminal and press enter" - ] - } - ] - }, - { - "id": "918", - "title": "echo $(( RANDOM % 75 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "918.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "a647a1019dcf87cfd6df4c2c537011011c194737" - ] - }, - "content": "Okay, I think I finally know how to get the random number for the Bingo Number Generator. Use `echo` and `RANDOM % 75` to print a random number in the terminal.", - "hints": [ - "Use the `$(( ... ))` syntax to calculate the random number", - "Here's an example: `echo $(( ))`", - "Type `echo $(( RANDOM % 75 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "920", - "title": "echo $(( RANDOM % 75 + 1 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "920.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "72de400421fcc8783821fc8b65f0fe028f4d1f42" - ] - }, - "content": "One tiny problem, that calculation will give a number between 0 and 74. Enter the same command in the terminal, but add `1` to the calculation to get a random number between 1 and 75.", - "hints": [ - "Type `echo $(( RANDOM % 75 + 1 ))` in the terminal and press enter" - ] - } - ] - }, - { - "id": "928", - "title": "Set NUMBER=$(( RANDOM % 75 + 1))", - "summary": "", - "content": "", - "steps": [ - { - "id": "928.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "f32145cc8853348b8a838881078d57922dd1ee8d" - ] - }, - "content": "Back in your `bingo.sh` script, change the `NUMBER` variable so that it starts as a random number between 1 and 75 using the syntax you have been practicing.", - "hints": [ - "Change the `NUMBER` variable to the result of the calculation `RANDOM % 75 + 1`", - "Use the `$(( ... ))` syntax to make the calculation", - "It should look like this: `NUMBER=$(( RANDOM % 75 + 1 ))`" - ] - } - ] - }, - { - "id": "930", - "title": "run ./bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "930.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "fea437ad85a8ab3c71abd2cafc003d42a66067c0" - ] - }, - "content": "Run your script a few times in a row to make sure it's working.", - "hints": [ - "Type `./bingo.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Run it at least two times in a row" - ] - } - ] - }, - { - "id": "940", - "title": "Add TEXT variable", - "summary": "", - "content": "", - "steps": [ - { - "id": "940.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "6b44b7e719cdac71644faf871f71de8cd7b7cdb8" - ] - }, - "content": "Next, create a `TEXT` variable and set the value to `\"The next number is, \"`. When the script is finished, the output will be something like `The next number is B:15`.", - "hints": [ - "Make sure there's a space after the comma", - "Add `TEXT=\"The next number is, \"` to the `bingo.sh` file" - ] - } - ] - }, - { - "id": "945", - "title": "help let", - "summary": "", - "content": "", - "steps": [ - { - "id": "945.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "e2284c78eed3b83639d00cf6fcffbfc91ce5483f" - ] - }, - "content": "The letter that goes with the random number depends on what the number is. If it's 15 or less, it will be a `B`. I saw some comparisons in the `help let` menu, take a look at it again.", - "hints": [ - "Type `help let` in the terminal and press enter" - ] - } - ] - }, - { - "id": "950", - "title": "Add first if <= 15", - "summary": "", - "content": "", - "steps": [ - { - "id": "950.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "904f5a419281ba14098c38e5c06942b3259043df" - ] - }, - "content": "You used the double square brackets with your `if` statement in the last program, but you can use the double parenthesis with these operators as well. In your script, create an `if` statement that uses double parenthesis for the condition. Check if the number variable is less than or equal to 15. If it is, use your two variables to print `The next number is, B:`.", - "hints": [ - "Make sure you only have two `echo` statements in your script, the title being one of them", - "Here's an example of how your `if` statement should look:\n```sh\nif (( CONDITION ))\nthen\n STATEMENTS\nfi\n```", - "The condition you want is `(( NUMBER <= 15 ))`", - "In the statements area, use `echo` and your two variables to print `The next number is, B:`", - "The statements area should look like this: `echo $TEXT B:$NUMBER`", - "The whole `if` statement should look like this:\n```sh\nif (( NUMBER <= 15 ))\nthen\n echo $TEXT B:$NUMBER\nfi\n```" - ] - } - ] - }, - { - "id": "960", - "title": "Add elif -le 30", - "summary": "", - "content": "", - "steps": [ - { - "id": "960.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "c12ab6f08ab57c445b13b525a04797673bf86181" - ] - }, - "content": "`if` statements can have an \"else if\" area like this:\n```sh\nif (( CONDITION ))\nthen\n STATEMENTS\nelif [[ CONDITION ]]\nthen\n STATEMENTS\nfi\n```\n\nUsing the double square brackets this time, add an `elif` condition that checks if the number variable is less than or equal to `30`. If it is, use your two variables again to print `The next number is, I:`", - "hints": [ - "View the `help test` menu to see the operators you can use with the double square brackets", - "The condition you want is `[[ $NUMBER -le 30 ]]`. Don't forget the `$`", - "In the statements area, use `echo` and your two variables to print `The next number is, I:`", - "The statements area should look like this: `echo $TEXT I:$NUMBER`", - "The `elif` area should look like this:\n```sh\nelif [[ $NUMBER -le 30 ]]\nthen\n echo $TEXT I:$NUMBER\nfi\n```", - "The whole `if` statement should look like this:\n```sh\nif (( NUMBER <= 15 ))\nthen\n echo $TEXT B:$NUMBER\nelif [[ $NUMBER -le 30 ]]\nthen\n echo $TEXT I:$NUMBER\nfi\n```" - ] - } - ] - }, - { - "id": "970", - "title": "Add elif < 46", - "summary": "", - "content": "", - "steps": [ - { - "id": "970.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "154979ffadbce61cc7e66f9fe01f7f915f424f0d" - ] - }, - "content": "You can add as many `elif` sections to an `if` statement as you want. Add another `elif`, below the last, one that uses the double parenthesis to check if the number variable is less than 46. If it is, use your two variables to print `The next number is, N:`", - "hints": [ - "View the `help let` menu to see the operators you can use with the double parenthesis", - "The operator you want it `<`", - "You can add another `elif` like this:\n```sh\nif CONDITION\nthen\n STATEMENTS\nelif CONDITION\nthen\n STATEMENTS\nelif CONDITION\nthen\n STATEMENTS\nfi\n```", - "The condition you want is `(( NUMBER < 46 ))`", - "In the statements area, use `echo` and your two variables to print `The next number is, N:`", - "The statements area should look like this: `echo $TEXT N:$NUMBER`", - "This `elif` area should look like this:\n```sh\nelif (( NUMBER < 46 ))\nthen\n echo $TEXT N:$NUMBER\nfi\n```", - "The whole `if` statement should look like this:\n```sh\nif (( NUMBER <= 15 ))\nthen\n echo $TEXT B:$NUMBER\nelif [[ $NUMBER -le 30 ]]\nthen\n echo $TEXT I:$NUMBER\nelif (( NUMBER < 46 ))\nthen\n echo $TEXT N:$NUMBER\nfi\n```" - ] - } - ] - }, - { - "id": "980", - "title": "Add elif -lt 61", - "summary": "", - "content": "", - "steps": [ - { - "id": "980.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "f999eade741d4626b8b61b5d4c85d1e590e1b8fe" - ] - }, - "content": "Run your script if you want to see the output. It should print one of the sentences if the random number is less than 46. It may take a couple tries. Add another `elif`, below the last one, that uses double square brackets to check if the number variable is less than 61. If it is, use your two variables to print `The next number is, G:`", - "hints": [ - "View the `help test` menu to see the operators you can use with the double square brackets", - "The operator you want it `-lt`", - "The condition you want is `[[ $NUMBER -lt 61 ]]`. Don't forget the `$`", - "The statements area should look like this: `echo $TEXT G:$NUMBER`", - "This `elif` area should look like this:\n```sh\nelif [[ $NUMBER -lt 61 ]]\nthen\n echo $TEXT G:$NUMBER\nfi\n```", - "The whole `if` statement should look like this:\n```sh\nif (( NUMBER <= 15 ))\nthen\n echo $TEXT B:$NUMBER\nelif [[ $NUMBER -le 30 ]]\nthen\n echo $TEXT I:$NUMBER\nelif (( NUMBER < 46 ))\nthen\n echo $TEXT N:$NUMBER\nelif [[ $NUMBER -lt 61 ]]\nthen\n echo $TEXT G:$NUMBER\nfi\n```" - ] - } - ] - }, - { - "id": "990", - "title": "Add else", - "summary": "", - "content": "", - "steps": [ - { - "id": "990.1", - "setup": { - "watchers": [ - "./bingo.sh" - ], - "commits": [ - "77e5baf13906b6c03340fa0c896ecc686e9c91cb" - ] - }, - "content": "One more case to handle. Add an `else` at the bottom of the `if` that uses your two variables to print `The next number is, O:`.", - "hints": [ - "View the `if/else` in your `countdown.sh` file to see how you did it before", - "You don't need a condition or the `then` on this one", - "Here's an example:\n```sh\nif CONDITION\nthen\n STATEMENTS\nelif CONDITION\nthen\n STATEMENTS\n...\nelse\n STATEMENTS\nfi\n```", - "The `else` area should look like this:\n```sh\nelse\n echo $TEXT O:$NUMBER\n```", - "The whole `if` should look like this:\n```sh\nif (( NUMBER <= 15 ))\nthen\n echo $TEXT B:$NUMBER\nelif [[ $NUMBER -le 30 ]]\nthen\n echo $TEXT I:$NUMBER\nelif (( NUMBER < 46 ))\nthen\n echo $TEXT N:$NUMBER\nelif [[ $NUMBER -lt 61 ]]\nthen\n echo $TEXT G:$NUMBER\nelse\n echo $TEXT O:$NUMBER\nfi\n```" - ] - } - ] - }, - { - "id": "1000", - "title": "./bingo.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1000.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "75648697077385dce332c4981809aa7e943c6ac1" - ] - }, - "content": "Run your script a few times and make sure it's working.", - "hints": [ - "Type `./bingo.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first", - "Run it at least two times in a row" - ] - } - ] - }, - { - "id": "1010", - "title": "touch fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1010.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "091912f82fb73a336dec8b75504aaa4ee6dd56c3" - ] - }, - "content": "I think the generator is done :smile: The next project is a fortune teller. Use the `touch` command to create `fortune.sh` in the same folder as the other scripts.", - "hints": [ - "Type `touch fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1020", - "title": "chmod +x fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1020.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "8578b65ca826b3b9ad36f2867f96013e961db1ff" - ] - }, - "content": "Give your file executable permissions.", - "hints": [ - "Use the `chmod` command with the `+x` flag", - "Here's an example `chmod `", - "You previously used `chmod +x bingo.sh`", - "Type `chmod +x fortune.sh` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1030", - "title": "Add shebang", - "summary": "", - "content": "", - "steps": [ - { - "id": "1030.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "0610814a83c882ce106c9b244dab2ed3138f07fe" - ] - }, - "content": "Add a `shebang` at the top of your new file that uses `bash` again.", - "hints": [ - "A `shebang` looks like this: `#!`", - "Enter `which bash` in the terminal to see the path to `bash`", - "Look at the `shebang` in one of your other scripts to get the syntax", - "It should look like this: `#!/bin/bash`", - "Add `#!/bin/bash` at the top of your `fortune.sh` file" - ] - } - ] - }, - { - "id": "1040", - "title": "Add comment", - "summary": "", - "content": "", - "steps": [ - { - "id": "1040.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "86b1e46e963430e14617c0163ba5ec7af1ff0472" - ] - }, - "content": "Add comment `Program to tell a persons fortune`", - "hints": [ - "Comments look like this: `# `", - "Add `#Program to tell a persons fortune` below the `shebang`", - "Capitalization matters" - ] - } - ] - }, - { - "id": "1050", - "title": "Add echo \"title\"", - "summary": "", - "content": "", - "steps": [ - { - "id": "1050.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "162216a6339368c37087b5a7fd80d2af3becec9d" - ] - }, - "content": "Add a title for this one like the others. This one should say `~~ Fortune Teller ~~`. Don't forget the empty line before and after it.", - "hints": [ - "Print the whole title and the empty lines with a single `echo` command", - "Use the `echo` command with the `-e` flag and the new line (`\\n`) character", - "Don't forget to put it in double quotes", - "Take a look at one of the title's from a previous file for a hint", - "Here's an example: `echo -e \"\\n\\n\"`", - "You previously used `echo -e \"\\n~~ Bingo Number Generator ~~\\n\"`", - "Add `echo -e \"\\n~~ Fortune Teller ~~\\n\"` below the comment of your `fortune.sh` file" - ] - } - ] - }, - { - "id": "1060", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1060.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "4268c1c887317dd1ba2effa1893b2b7911ab51ca" - ] - }, - "content": "Run the file once to make sure it's working.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1070", - "title": "ARR=(\"a\" \"b\" \"c\")", - "summary": "", - "content": "", - "steps": [ - { - "id": "1070.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "78dbeb83aeee77fa37c9ec3f4d128e1bbbb7dab3" - ] - }, - "content": "This program will have an array of responses. One will be printed randomly after a user inputs a question. Practice first :smile: In the terminal, create an array like this: `ARR=(\"a\" \"b\" \"c\")`", - "hints": [ - "Type the suggested command in the terminal", - "Type `ARR=(\"a\" \"b\" \"c\")` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1080", - "title": "echo ${ARR[1]}", - "summary": "", - "content": "", - "steps": [ - { - "id": "1080.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "32ec4d1f6be27850c3562f09f6e5d8366bdfac1b" - ] - }, - "content": "Each variable in the array is like any other variable, just combined into a single variable. In the terminal, print the second item in the array with `echo ${ARR[1]}`. Note that the first item would be index zero.", - "hints": [ - "Type `echo ${ARR[1]}` in the terminal" - ] - } - ] - }, - { - "id": "1090", - "title": "echo ${ARR[@]}", - "summary": "", - "content": "", - "steps": [ - { - "id": "1090.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "dd9881a7a38b07bf1b69d1b78d305323d72b0278" - ] - }, - "content": "If you recall, you were able to print all the arguments to your `countdown.sh` script with `echo $*`. `echo $@` would have worked as well. Similarly, you can use the `*` or `@` to print your whole array. In the terminal, use `echo` to print all the items in your array.", - "hints": [ - "Here's an example `echo ${ARR[]}`", - "Type `echo ${ARR[@]}` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1100", - "title": "declare -p ARR", - "summary": "", - "content": "", - "steps": [ - { - "id": "1100.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "8cc2db6813a9f2aa7706e9e37f80ff80d7074340" - ] - }, - "content": "The variable must be in that `declare` list. View your array variable using the `declare` command and the `-p` flag.", - "hints": [ - "Here's an example: `declare -p `", - "Type `declare -p ARR` in the terminal" - ] - } - ] - }, - { - "id": "1110", - "title": "Add RESPONSES array", - "summary": "", - "content": "", - "steps": [ - { - "id": "1110.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "7bc1529027c76784d301d89026e2d8c8eb66fdfe" - ] - }, - "content": "The `-a` next to it stands for `array`. In your script, create an array named `RESPONSES`. Give it these six values: `Yes`, `No`, `Maybe`, `Outlook good`, `Don't count on it`, and `Ask again later`.", - "hints": [ - "Here's an example: `VARIABLE=(value value ...)`", - "Make sure any values with spaces are in proper quotes", - "You created your other array with `ARR=(\"a\" \"b\" \"c\")`", - "Add `RESPONSES=(\"Yes\" \"No\" \"Maybe\" \"Outlook good\" \"Don't count on it\" \"Ask again later\")` in your script" - ] - } - ] - }, - { - "id": "1120", - "title": "echo ${RESPONSES[5]}", - "summary": "", - "content": "", - "steps": [ - { - "id": "1120.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "ec1b52c89e4bb4bcf126a691a26117d72b79706c" - ] - }, - "content": "In your script, use `echo` to print the last item in the array.", - "hints": [ - "Here's an example `echo ${ARR[]}`", - "Remember that the first item starts at zero", - "Add `echo ${RESPONSES[5]}` to your `fortune.sh` file" - ] - } - ] - }, - { - "id": "1130", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1130.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "21e70693d37e3ea44e207afb7643b806433b1de5" - ] - }, - "content": "Run it to see the output.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1140", - "title": "Add N=$(( RANDOM % 6 ))", - "summary": "", - "content": "", - "steps": [ - { - "id": "1140.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "bbc6d929d41329cb46cc99ea5fb7a58f3f63a637" - ] - }, - "content": "You will randomly print one of the values. In your script, create a variable named `N`. Set it equal to a random number between `0` and `5`, the first and last index of the array.", - "hints": [ - "Use the modulus (`%`) operator and `6` to get a number between `0` and `5`", - "Look at the random number you created in the `bingo.sh` file for a hint", - "Here's an example: `VARIABLE=$(( ))`", - "Calculate a random number in the range you want with `RANDOM % 6`", - "Add `N=$(( RANDOM % 6 ))` to the script" - ] - } - ] - }, - { - "id": "1150", - "title": "Change to echo ${RESPONSES[$N]}", - "summary": "", - "content": "", - "steps": [ - { - "id": "1150.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "d2daa5cbf01a3464148765c9353612e50a2d9a4c" - ] - }, - "content": "Change your `echo` command to print the item in the array whose index is the random number you generated.", - "hints": [ - "Use your `$N` variable as the index where you print an item from the array", - "Don't forget that scripts run from top to bottom, so you can't use any variables before they are created", - "Change the `echo` line to `echo ${RESPONSES[$N]}`" - ] - } - ] - }, - { - "id": "1160", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "1160.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "851f3b8c422d74d0bddddb0b7eb34c4081f7b3f9" - ] - }, - "content": "You will create a function to generate an answer. Check the `help` menu to see if you can find anything.", - "hints": [ - "Enter the suggested command in the terminal", - "Type `help` in the terminal" - ] - } - ] - }, - { - "id": "1170", - "title": "help function", - "summary": "", - "content": "", - "steps": [ - { - "id": "1170.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "c018988958dc91a4beecdb1a0458d7e3d2ab1288" - ] - }, - "content": "See any that might help? There's one that says `function`. See if you can find out more about it.", - "hints": [ - "Use the `help` command to find out more", - "Here's an example: `help `", - "Type `help function` in the terminal" - ] - } - ] - }, - { - "id": "1180", - "title": "Add GET_FORTUNE function", - "summary": "", - "content": "", - "steps": [ - { - "id": "1180.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "327d85a12a6a2d4c43aea195a9959ae188da1fbc" - ] - }, - "content": "It looks like you can create a function like this:\n\n```sh\nFUNCTION_NAME() {\n STATEMENTS\n}\n```\n\nAdd an empty function named `GET_FORTUNE` to your script. Make sure the response you are printing is the last thing in the script.", - "hints": [ - "Add this to your script:\n```sh\nGET_FORTUNE() {}\n```", - "Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file" - ] - } - ] - }, - { - "id": "1190", - "title": "Add echo Ask a yes or no question", - "summary": "", - "content": "", - "steps": [ - { - "id": "1190.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "e12272e90ff5acf749a850c5d7bcf665dcebbdf9" - ] - }, - "content": "In your function, use `echo` to print `Ask a yes or no question:`", - "hints": [ - "Your function should look like this:\n```sh\nGET_FORTUNE() {\n echo Ask a yes or no question:\n}\n```", - "Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file" - ] - } - ] - }, - { - "id": "1200", - "title": "Add GET_FORTUNE function call", - "summary": "", - "content": "", - "steps": [ - { - "id": "1200.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "52cd2a8b552c14449bdfe6fd25e6b45ae597203e" - ] - }, - "content": "Call your function by putting the name of it below where you create it. No `$` needed. Make sure the response you are printing is at the bottom of the file.", - "hints": [ - "Add `GET_FORTUNE` below where you create your function to call it", - "Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file" - ] - } - ] - }, - { - "id": "1210", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1210.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "a7695da26838b007dc4e85862826be1e2bb30b1b" - ] - }, - "content": "Run your script to make sure it's working.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1220", - "title": "Add read QUESTION", - "summary": "", - "content": "", - "steps": [ - { - "id": "1220.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "4fb51b6dec833c289bdf3ad97b5cf0433dd8bfdf" - ] - }, - "content": "In your function after you print the sentence, use `read` to get user input into a variable named `QUESTION`.", - "hints": [ - "Add `read QUESTION` to your function below the `echo`", - "Your function should look like this:\n```sh\nGET_FORTUNE() {\n echo Ask a yes or no question:\n read QUESTION\n}\n```", - "Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file" - ] - } - ] - }, - { - "id": "1230", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1230.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "abcaa2b9323e45188ef1ad97487815436bc9db3a" - ] - }, - "content": "Run the script again to test it out. Enter a question when it asks.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1240", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "1240.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ef067d88fac584fef91546a9edf43371ff42d54d" - ] - }, - "content": "I want to make sure the input is a question. You are going to add a loop that asks for input until the input ends with a question mark. View the `help` menu to see if you can find an appropriate loop.", - "hints": [ - "Type `help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1250", - "title": "help until", - "summary": "", - "content": "", - "steps": [ - { - "id": "1250.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "40ae7e8e1aaee1569d7c3a58a7d258b121a4ed37" - ] - }, - "content": "View more about that `until` command. That might be the one to use here.", - "hints": [ - "Use `help ` to view more about a command", - "Type `help until` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1260", - "title": "Add until loop", - "summary": "", - "content": "", - "steps": [ - { - "id": "1260.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "e0c642d4efe1ec69189162007e2bb73ea0027ef1" - ] - }, - "content": "The `until` loop is very similar to the `while` loop you used. It will execute the loop until a condition is met. Here's an example:\n\n```sh\nuntil [[ CONDITION ]]\ndo\n STATEMENTS\ndone\n```\n\nAdd an `until` loop below your function. Use the double brackets to check if `QUESTION` is equal to `test?`. Move the `GET_FORTUNE` function call to the statements area of the loop. It should run the function until you input `test?` as the question.", - "hints": [ - "View the `help [[` or `help test` menu to see if you can find the operator to use", - "You want the `==` operator", - "The condition should look like this: `[[ $QUESTION == test? ]]`", - "Your `until` loop should look like this:\n```sh\nuntil [[ $QUESTION == test? ]]\ndo\n GET_FORTUNE\ndone\n```", - "You should only call the `GET_FORTUNE` function once", - "Your `echo ${RESPONSES[$N]}` command should be at the bottom of the file" - ] - } - ] - }, - { - "id": "1270", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1270.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "3450bdac3e3f4298714e1e1515a2e87ccd117fed" - ] - }, - "content": "Run the script and enter something other than `test?`. Then enter `test?` after it asks for a question the second time.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1280", - "title": "help [[ expression ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "1280.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "814637db4fce7bf27982fbcdd15716e22cf0315a" - ] - }, - "content": "View that `help [[ expression ]]` menu again. You need to find out how to test if the input ends with a question mark (`?`).", - "hints": [ - "Type `help [[` or `help [[ expression ]]` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1290", - "title": "[[ hello == hello ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1290.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "8746c43c0f46fc59342bbf0be0269733a60fab78" - ] - }, - "content": "Let's play with these again. You can test if two strings are the same with `==`. In the terminal, use the `[[ ... ]]; echo $?` syntax you used before to test if `hello` is equal to `hello`.", - "hints": [ - "Be sure to use the `==` operator", - "Type `[[ hello == hello ]]; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1300", - "title": "[[ hello == world ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1300.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "7faeea77db51b79188d7d586ad3d52d349607990" - ] - }, - "content": "Exit status of `0`, it was true. Using the same syntax, test if `hello` is equal to `world`.", - "hints": [ - "Use the `[[ ... ]]; echo $?` syntax", - "Be sure to use the `==` operator", - "Type `[[ hello == world ]]; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1310", - "title": "[[ hello =~ el ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1310.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "3429f935110a1002d9ef8f11c55c0deda299eb6f" - ] - }, - "content": "False. An important operator in that menu is `=~`. It allows for pattern matching. Using the same syntax but with this operator, check if `hello` contains the pattern `el`.", - "hints": [ - "Use the `[[ ... ]]; echo $?` syntax", - "Use the `=~` operator with it", - "Type `[[ hello =~ el ]]; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1320", - "title": "[[ \"hello world\" =~ \"lo wor\" ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1320.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2d2ca6865b121e33c9c1b7a1435a4fb8d72b95bb" - ] - }, - "content": "True. The condition was checking for `el` within the word `hello`. Using the same syntax, check if `hello world` contains the pattern `lo wor`. You will need to put them both in quotes so it recognizes the spaces.", - "hints": [ - "Use the `[[ ... ]]; echo $?` syntax", - "Use the `=~` operator with it", - "Type `[[ \"hello world\" =~ \"lo wor\" ]]; echo $?` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1330", - "title": "[[ \"hello world\" =~ ^h ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1330.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2e9053f4e9191f5cf2721ee4aea2bb806f6c69ba" - ] - }, - "content": "Your patterns have been checking for literal matches, `el` and `lo wor`. You can use regular expression characters as well, but you can't put the pattern in quotes when you do. Using the same syntax, check if `hello world` starts with an `h` by using `^h` as the pattern.", - "hints": [ - "Make sure not to use quotes around the pattern when using regex characters it", - "Type `[[ \"hello world\" =~ ^h ]]; echo $?` in the terminal" - ] - } - ] - }, - { - "id": "1340", - "title": "[[ \"hello world\" =~ ^h.+d$ ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1340.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "bde1437e6868a46778920620a6ee33ff520c3106" - ] - }, - "content": "Do it again, but use `^h.+d$` as the pattern to see if the string starts with an `h`, has at least one character after it, and ends with a `d`.", - "hints": [ - "Use the `[[ ... ]]; echo $?` syntax again", - "Check if `hello world` contains the suggested pattern", - "Make sure not to use quotes around the pattern when using regex characters it", - "Type `[[ \"hello world\" =~ ^h.+d$ ]]; echo $?` in the terminal" - ] - } - ] - }, - { - "id": "1350", - "title": "VAR=\"hello world\"", - "summary": "", - "content": "", - "steps": [ - { - "id": "1350.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ea5ee7cb0e002a6fe36f9ee53eaf7164f9208041" - ] - }, - "content": "In the terminal, create a variable named `VAR` that equals `hello world`.", - "hints": [ - "Type `VAR=\"hello world\"` in the terminal" - ] - } - ] - }, - { - "id": "1360", - "title": "echo $VAR", - "summary": "", - "content": "", - "steps": [ - { - "id": "1360.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "28314e08ace3ee3026f27d3e17fb1262947f9a27" - ] - }, - "content": "Use `echo` to print the variable you just created.", - "hints": [ - "Type `echo $VAR` in the terminal" - ] - } - ] - }, - { - "id": "1370", - "title": "[[ $VAR == \"hello world\" ]]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1370.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "dd275d39c5579a25a2738622840b491d3c5593b4" - ] - }, - "content": "Using the `[[ ... ]]; echo $?` syntax, check if your variable is equal to `hello world`.", - "hints": [ - "Check the `help [[` menu to find the operator to use", - "It's the `==` operator", - "You want to check if `$VAR == \"hello world\"`", - "Type `[[ $VAR == \"hello world\" ]]; echo $?` in the terminal" - ] - } - ] - }, - { - "id": "1380", - "title": "[[ $VAR =~ \\?$ ]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1380.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "1bd60833f62a63ab0d681e7a56ce50ec2f284e23" - ] - }, - "content": "Using the same syntax, check if your variable ends with `?` by using the pattern `\\?$`.", - "hints": [ - "Be sure to use the pattern matching operator", - "It's the `=~` operator", - "You want to check if `$VAR =~ \\?$`", - "Type `[[ $VAR =~ \\?$ ]]; echo $?` in the terminal" - ] - } - ] - }, - { - "id": "1385", - "title": "[[ test? =~ \\?$ ]; echo $?", - "summary": "", - "content": "", - "steps": [ - { - "id": "1385.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "5d2bda9231186f953db932c12ed82b28524ba43b" - ] - }, - "content": "It doesn't end with `?`. Just to make sure I don't have the pattern wrong, check if `test?` ends with `?`.", - "hints": [ - "Use the same `[[ ... ]]; echo $?` syntax you have been using", - "Use the `\\?$` pattern to see if a string ends with `?`", - "Make sure you're using the pattern matching operator `=~`", - "You want to check if `test? =~ \\?$`", - "Type `[[ test? =~ \\?$ ]]; echo $?` in the terminal" - ] - } - ] - }, - { - "id": "1390", - "title": "Change until condition", - "summary": "", - "content": "", - "steps": [ - { - "id": "1390.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "cb5142cd8434d3e23aeecb4f7532a54744a5a550" - ] - }, - "content": "I think that will work. Back in your script, change the `until` condition to see if your variable ends with `?`.", - "hints": [ - "Use the pattern matching operator with `\\?$`", - "It's the `=~` operator", - "Your condition should look like this: `[[ $QUESTION =~ \\?$ ]]`", - "Make sure there's spaces inside the brackets and around the operator" - ] - } - ] - }, - { - "id": "1400", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1400.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "494562adfed9aabb9c24778b2d2b47f109d579ae" - ] - }, - "content": "Run the script and input something that doesn't end with `?` the first time, then something that does the second.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1410", - "title": "Add if to GET_FORTUNE", - "summary": "", - "content": "", - "steps": [ - { - "id": "1410.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "aeae05477a13c14adeb951b76770cfb887ed19a1" - ] - }, - "content": "I know that it asks the same thing if the input isn't what you want. You should let users know that it needs to end with `?`. Add an `if` condition in your **function** that checks `if [[ ! $1 ]]`. Put the existing `echo` statement in the `then` area and make sure the existing `read` is below the whole `if` condition.", - "hints": [ - "Here's an example:\n```sh\nif [[ CONDITION ]]\nthen\n STATEMENTS\nfi\n\nread QUESTION\n```", - "Your function should look like this:\n```sh\nfunction GET_FORTUNE() {\n if [[ ! $1 ]]\n then\n echo Ask a yes or no question:\n fi\n\n read QUESTION\n}\n```" - ] - } - ] - }, - { - "id": "1412", - "title": "Add else to if [[ ! $1 ]]", - "summary": "", - "content": "", - "steps": [ - { - "id": "1412.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "380bf3b8be3bd0772f7f12ad9a2045d27816b178" - ] - }, - "content": "You can pass arguments to functions like you did with your script. This condition will check if one isn't passed and print the sentence. Add an `else` to your `if`. Use `echo` to print `Try again. Make sure it ends with a question mark:` if the condition fails.", - "hints": [ - "Here's an example:\n```sh\nif [[ CONDITION ]]\nthen\n STATEMENTS\nelse\n STATEMENTS\nfi\n```", - "Your `if` condition should look like this:\n```sh\nif [[ ! $1 ]]\nthen\n echo Ask a yes or no question:\nelse\n echo Try again. Make sure it ends with a question mark:\nfi\n```" - ] - } - ] - }, - { - "id": "1413", - "title": "Add argument to function call", - "summary": "", - "content": "", - "steps": [ - { - "id": "1413.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "4a438f7dfb9076a664895420c34919370910ea6f" - ] - }, - "content": "Now, your function will print one thing if you pass it any argument, and something else if not. In the `until` loop, add `again` as an argument to where you call the function.", - "hints": [ - "Here's an example: `FUNCTION_NAME argument`", - "Your function call should look like this: `GET_FORTUNE again`", - "Your `until` loop should look like this:\n```sh\nuntil [[ $QUESTION =~ \\?$ ]]\ndo\n GET_FORTUNE again\ndone\n```" - ] - } - ] - }, - { - "id": "1416", - "title": "Add Initial function call", - "summary": "", - "content": "", - "steps": [ - { - "id": "1416.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "324fcb85a3d1ee627f5e3f6e671a748df364e837" - ] - }, - "content": "Now, each time the function is called in the `until` loop, it will pass `again` as an argument and print the `Try again...` sentence. Before your `until` loop, call the function without an argument so the first time it runs, it prints the initial sentence.", - "hints": [ - "Add `GET_FORTUNE` before the `until` loop" - ] - } - ] - }, - { - "id": "1420", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1420.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "9e9241861d3594cd8d9e9fe71b740a423471c0c8" - ] - }, - "content": "Run the script and enter something without a question mark when it asks the first time. Use a question mark the second time.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1425", - "title": "Add line break in front of response", - "summary": "", - "content": "", - "steps": [ - { - "id": "1425.1", - "setup": { - "watchers": [ - "./fortune.sh" - ], - "commits": [ - "d2c548715c431f43692b6c78e38795a7fdf0335b" - ] - }, - "content": "Awesome. One last thing. Add an empty line in front of where you print the response.", - "hints": [ - "Change the existing `echo ${RESPONSES[$N]}` line", - "Use the `-e` flag and the new line (`\\n`) character with the `echo` statement", - "Make sure to use quotes so it prints the new line", - "Run the script and see if it's working", - "The suggested command should look like this: `echo -e \"\\n${RESPONSES[$N]}\"`" - ] - } - ] - }, - { - "id": "1428", - "title": "./fortune.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1428.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "efefa327a027bae2b7f4b8cbcf5b9fa45b5693c9" - ] - }, - "content": "Run the script one more time to see if you like the output.", - "hints": [ - "Type `./fortune.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1430", - "title": "touch five.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1430.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "781ce90e8da4e84d244b6405cfa8b1bff0d735c0" - ] - }, - "content": "Excellent. One last program to make. Use `touch` to create a new file named `five.sh` in the same folder as the others.", - "hints": [ - "Type `touch five.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1440", - "title": "chmod +x five.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1440.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "b3cd240d5c0e890b4f7d0376bfacec6653497ef4" - ] - }, - "content": "Give your file executable permissions.", - "hints": [ - "Use the `chmod` command with the `+x` flag", - "Here's an example `chmod `", - "You previously used `chmod +x fortune.sh`", - "Type `chmod +x five.sh` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1450", - "title": "Add shebang", - "summary": "", - "content": "", - "steps": [ - { - "id": "1450.1", - "setup": { - "watchers": [ - "./five.sh" - ], - "commits": [ - "600d935f73ca8d6eade088cb30cc3c51bd09eb70" - ] - }, - "content": "Add a `shebang` to the new script that uses `bash` like the others.", - "hints": [ - "A `shebang` looks like this: `#!`", - "Enter `which bash` in the terminal to see the path to `bash`", - "Look at the `shebang` in one of your other scripts to get the syntax", - "It should look like this: `#!/bin/bash`", - "Add `#!/bin/bash` at the top of your `five.sh` file" - ] - } - ] - }, - { - "id": "1460", - "title": "Add comment", - "summary": "", - "content": "", - "steps": [ - { - "id": "1460.1", - "setup": { - "watchers": [ - "./five.sh" - ], - "commits": [ - "ed12144637452be8a7607aa9620e08889eb3e44c" - ] - }, - "content": "Add a comment below the `shebang` that says, `Program to run my other four programs`", - "hints": [ - "Comments look like this: `# `", - "Add `# Program to run my other four programs` below the `shebang`", - "Capitalization matters" - ] - } - ] - }, - { - "id": "1470", - "title": "Add ./questionnaire.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1470.1", - "setup": { - "watchers": [ - "./five.sh" - ], - "commits": [ - "596f431aa5f3db7610463e7a146a98a0224e6afe" - ] - }, - "content": "This program will run all the programs you made so far consecutively. Add the command to run the `questionnaire.sh` file.", - "hints": [ - "The command should look like how you would execute the file in the terminal", - "Add `./questionnaire.sh` to the `five.sh` file" - ] - } - ] - }, - { - "id": "1480", - "title": "./five", - "summary": "", - "content": "", - "steps": [ - { - "id": "1480.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "35cc3cea0ca8e5d30e2b5c75e8fa90dea42c4377" - ] - }, - "content": "Run the file to see if it works. Enter input when it asks.", - "hints": [ - "Type `./five.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1490", - "title": "Add the rest of the scripts", - "summary": "", - "content": "", - "steps": [ - { - "id": "1490.1", - "setup": { - "watchers": [ - "./five.sh" - ], - "commits": [ - "92850450c6ec7cbdb5c17f47d7bc4ce8e372afa3" - ] - }, - "content": "Add commands to run the rest of your scripts in the file. They should be in this order: `questionnaire`, `countdown`, `bingo`, and `fortune`. Don't forget that your `countdown.sh` file needs an argument, so put a `3` next to it.", - "hints": [ - "Your `five.sh` file should have these commands:\n```sh\n./questionnaire.sh\n./countdown.sh 3\n./bingo.sh\n./fortune.sh\n```" - ] - } - ] - }, - { - "id": "1500", - "title": "Clear", - "summary": "", - "content": "", - "steps": [ - { - "id": "1500.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ab932636cb400bcae42284cd965bf0293eea4f5a" - ] - }, - "content": "Okay, use `clear` to empty out what's in the terminal before the big moment.", - "hints": [ - "Type `clear` in the terminal" - ] - } - ] - }, - { - "id": "1510", - "title": "./five", - "summary": "", - "content": "", - "steps": [ - { - "id": "1510.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "000f62662ab29bb322e4c16f8d296b0309c969fe" - ] - }, - "content": "Run the script and enter input when it asks.", - "hints": [ - "Type `./five.sh` in the terminal and press enter", - "Make sure you are in the `project` folder first" - ] - } - ] - }, - { - "id": "1520", - "title": "help", - "summary": "", - "content": "", - "steps": [ - { - "id": "1520.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "0020e8e0262b988a15ca445fcd5a256b9a23c6fb" - ] - }, - "content": "Cool. I think all the scripts are done. View the `help` menu again I want to explore one more thing.", - "hints": [ - "Type `help` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1530", - "title": "help type", - "summary": "", - "content": "", - "steps": [ - { - "id": "1530.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "e497707bc47bb00839f084976de8a931080ef111" - ] - }, - "content": "View more about that `type` command.", - "hints": [ - "Use `help ` to find out more about a command", - "Type `help type` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1540", - "title": "type echo", - "summary": "", - "content": "", - "steps": [ - { - "id": "1540.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "85aab97c0f3a73d1b01c80c97a39580afaf2e49c" - ] - }, - "content": "It says you can view the type of a command with `type `. Just for fun, lets take a look at the type of a few different commands. View the type of `echo`.", - "hints": [ - "Type `type echo` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1550", - "title": "type read", - "summary": "", - "content": "", - "steps": [ - { - "id": "1550.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "2042a1384041e64f140e8239a31a386ac965186d" - ] - }, - "content": "View the type of the `read` command.", - "hints": [ - "Type `type read` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1560", - "title": "type if", - "summary": "", - "content": "", - "steps": [ - { - "id": "1560.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "21c228b482c27b245638be8bfaaad8c5b63d9a63" - ] - }, - "content": "View the type of `if`", - "hints": [ - "Type `type if` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1570", - "title": "type then", - "summary": "", - "content": "", - "steps": [ - { - "id": "1570.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "33d983b0b632042e55d82b514b234fbc2b4e4c2b" - ] - }, - "content": "View the type of `then`", - "hints": [ - "Type `type then` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1580", - "title": "type bash", - "summary": "", - "content": "", - "steps": [ - { - "id": "1580.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "a638a83758e348d9c9794d1963c637ec219306f3" - ] - }, - "content": "Those were all from the `help` menu and described as a `shell builtin` or `shell keyword`. View the type of `bash`", - "hints": [ - "Type `type bash` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1590", - "title": "type psql", - "summary": "", - "content": "", - "steps": [ - { - "id": "1590.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "504b22b8212d539520fed73bd00ee28925ac1f8e" - ] - }, - "content": "That's the location of the `bash` command. View the type of `psql`.", - "hints": [ - "Type `type psql` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1600", - "title": "type ./five.sh", - "summary": "", - "content": "", - "steps": [ - { - "id": "1600.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "ece9f053a5f0f0f859b848d6d38b99d9c100841a" - ] - }, - "content": "It's showing the location of the commands. View the type of your `./five.sh` file.", - "hints": [ - "Type `type ./five.sh` in the terminal and press enter" - ] - } - ] - }, - { - "id": "1610", - "title": "exit", - "summary": "", - "content": "", - "steps": [ - { - "id": "1610.1", - "setup": { - "watchers": [ - "../.bash_history" - ], - "commits": [ - "876baa475f70b3df2a4df9fbb87bec857b72ec4d" - ] - }, - "content": "Last step, close the terminal with the `exit` command. Thanks and happy coding!", - "hints": [ - "Type `exit` in the terminal and press enter" - ] - } - ] - } - ] -} \ No newline at end of file From fef4cbd4d3b52cb807f1bd5cf48dd8ef7fccd2d6 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:03:27 -0600 Subject: [PATCH 04/86] 20.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index ce03adf7cb..ecf66ddf01 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/10.test.js"], + "spec": ["./test/20.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 6419068186915ca9316251a9bf5e632beb3f91fb Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:41:58 +0000 Subject: [PATCH 05/86] Save progress: 20.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index b2f7080375..afdd3430b3 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -1,2 +1,3 @@ /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index e5f3117b44..6543cdeaa0 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -30,3 +30,4 @@ __vsc_dbg_trap="$(__vsc_get_trap DEBUG)" trap '__vsc_preexec_all "$_"' DEBUG __vsc_original_prompt_command=${PROMPT_COMMAND:-} echo hello bash +touch questionnaire.sh From 0afdb4df38ea93c65a8a7cafaf72135e99c9a0ba Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:08:59 -0600 Subject: [PATCH 06/86] 30.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset.sh | 1 + .freeCodeCamp/reset_files/questionnaire.sh | 0 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100755 .freeCodeCamp/reset_files/questionnaire.sh diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index ecf66ddf01..fabc5d47e3 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/20.test.js"], + "spec": ["./test/30.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset.sh b/.freeCodeCamp/reset.sh index e69de29bb2..626774efde 100755 --- a/.freeCodeCamp/reset.sh +++ b/.freeCodeCamp/reset.sh @@ -0,0 +1 @@ +cp ./.freeCodeCamp/reset_files/questionnaire.sh . \ No newline at end of file diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh new file mode 100755 index 0000000000..e69de29bb2 From b22e4915c2829d436f46e9de0d3201ad2ce8127d Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:43:28 +0000 Subject: [PATCH 07/86] questionnaire.sh --- questionnaire.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh new file mode 100644 index 0000000000..e69de29bb2 From c53152a5814cc4a787c3f664b8fcaee052b08bb8 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:44:08 +0000 Subject: [PATCH 08/86] Save progress: 30.1 --- questionnaire.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/questionnaire.sh b/questionnaire.sh index e69de29bb2..c7363c798d 100644 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -0,0 +1 @@ +echo hello questionnaire \ No newline at end of file From a34dbf5b709a3fb53413d42d8e6ceea330a95a3b Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Sun, 7 Mar 2021 19:16:27 -0600 Subject: [PATCH 09/86] 35.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index fabc5d47e3..dde8ad5d59 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/30.test.js"], + "spec": ["./test/35.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From eb3c3f7dc56e8867b990a1da2e2896e509ec897d Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:44:51 +0000 Subject: [PATCH 10/86] Save progress: 35.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index afdd3430b3..bdbaaa4636 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -1,3 +1,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 6543cdeaa0..3fb8e50966 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -31,3 +31,4 @@ trap '__vsc_preexec_all "$_"' DEBUG __vsc_original_prompt_command=${PROMPT_COMMAND:-} echo hello bash touch questionnaire.sh +sh questionnaire.sh From 0bba13e9fa8cfcaeb1ed44c6aacf0de99b9c7a46 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:11:43 -0600 Subject: [PATCH 11/86] 40.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index dde8ad5d59..92f441fb10 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/35.test.js"], + "spec": ["./test/40.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index e69de29bb2..c7363c798d 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -0,0 +1 @@ +echo hello questionnaire \ No newline at end of file From 1d2086e4a75f9038c0d5b18aa8da01e60bd3ba32 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:45:31 +0000 Subject: [PATCH 12/86] Save progress: 40.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index bdbaaa4636..e4d32ae4f6 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -2,3 +2,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 3fb8e50966..6e2debe9a9 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -32,3 +32,4 @@ __vsc_original_prompt_command=${PROMPT_COMMAND:-} echo hello bash touch questionnaire.sh sh questionnaire.sh +bash questionnaire.sh From 32d9312f9920e1c9bf2a7c98aa220ca4d53c73ff Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:14:24 -0600 Subject: [PATCH 13/86] 50.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 92f441fb10..9fddadda33 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/40.test.js"], + "spec": ["./test/50.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From b51ac6c9efc2a0ce0829b810d04003e404b32d6f Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:46:08 +0000 Subject: [PATCH 14/86] Save progress: 50.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index e4d32ae4f6..73c302997d 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -3,3 +3,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 6e2debe9a9..366d6d6ade 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -33,3 +33,4 @@ echo hello bash touch questionnaire.sh sh questionnaire.sh bash questionnaire.sh +which bash From fefee8da316ca1bbf3ee2ed74d95e6eb4f65a14d Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:16:04 -0600 Subject: [PATCH 15/86] 60.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 9fddadda33..632cdd382d 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/50.test.js"], + "spec": ["./test/60.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From fe135d1872322c9995f98a43fa46271a2ba0246e Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:47:12 +0000 Subject: [PATCH 16/86] Save progress: 60.1 --- questionnaire.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/questionnaire.sh b/questionnaire.sh index c7363c798d..1e7bab5905 100644 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1 +1,3 @@ -echo hello questionnaire \ No newline at end of file +echo hello questionnaire + +#!/bin/bash \ No newline at end of file From 4fe99c58ce6b1c2423f5c27ba5e6a8c0bfdd142a Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:22:01 -0600 Subject: [PATCH 17/86] 70.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 632cdd382d..e8cbeeb7e8 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/60.test.js"], + "spec": ["./test/70.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index c7363c798d..74f56419af 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1 +1,3 @@ +#!/bin/bash + echo hello questionnaire \ No newline at end of file From 091ebd0ef9b5442f8b82730f0829e1bb4c7ebd8c Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:47:40 +0000 Subject: [PATCH 18/86] Save progress: 70.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 73c302997d..805571976a 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -4,3 +4,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 366d6d6ade..60b9c63aff 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -34,3 +34,4 @@ touch questionnaire.sh sh questionnaire.sh bash questionnaire.sh which bash +./questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh index 1e7bab5905..f759f8e821 100644 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,3 +1,3 @@ echo hello questionnaire -#!/bin/bash \ No newline at end of file +#!/bin/bash From 5349e13ebe2c4502861cebd9ece882522a1f9612 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:22:15 -0600 Subject: [PATCH 19/86] 80.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index e8cbeeb7e8..9bcd52117c 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/70.test.js"], + "spec": ["./test/80.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 23fecaa15817918f6d519ab99ef3deb58d23d1a6 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:48:01 +0000 Subject: [PATCH 20/86] Save progress: 80.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 805571976a..db3c6bd450 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -5,3 +5,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 60b9c63aff..c69d79ddfc 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -35,3 +35,4 @@ sh questionnaire.sh bash questionnaire.sh which bash ./questionnaire.sh +ls --color=auto -l From 921088c387db5bff4c7d64c4d8999a1f42833cad Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:22:34 -0600 Subject: [PATCH 21/86] 90.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 9bcd52117c..2fbb3230ee 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/80.test.js"], + "spec": ["./test/90.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 60ffa5527f849ff27d8f76a712488d733082983d Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:48:45 +0000 Subject: [PATCH 22/86] Save progress: 90.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 0 3 files changed, 2 insertions(+) mode change 100644 => 100755 questionnaire.sh diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index db3c6bd450..dcf92f99e6 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -6,3 +6,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index c69d79ddfc..1a68663669 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -36,3 +36,4 @@ bash questionnaire.sh which bash ./questionnaire.sh ls --color=auto -l +chmod +x questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh old mode 100644 new mode 100755 From 2abab9b65fd0d2ab90641f7c0eda4e8e8715a4f1 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:23:49 -0600 Subject: [PATCH 23/86] 100.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 2fbb3230ee..b333473bb8 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/90.test.js"], + "spec": ["./test/100.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 21cecbf9f2bd6b0e9e8e8365956e5e9b7fdd4ad7 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:48:57 +0000 Subject: [PATCH 24/86] Save progress: 100.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index dcf92f99e6..d07992d9c3 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -7,3 +7,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 1a68663669..de65c4e5d1 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -37,3 +37,4 @@ which bash ./questionnaire.sh ls --color=auto -l chmod +x questionnaire.sh +ls --color=auto -l From 8dd15e26fa037f73e00a04b86d47c3784e0b03fa Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:24:44 -0600 Subject: [PATCH 25/86] 110.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index b333473bb8..fcaba9244a 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/100.test.js"], + "spec": ["./test/110.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 228033c372493ba11451860b1bf51d2ab30078bf Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:49:16 +0000 Subject: [PATCH 26/86] Save progress: 110.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index d07992d9c3..ce28c22a4c 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -8,3 +8,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index de65c4e5d1..25ae36f2bc 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -38,3 +38,4 @@ which bash ls --color=auto -l chmod +x questionnaire.sh ls --color=auto -l +./questionnaire.sh From c867698f8ac0cd164367c965ed98b6d3b5502516 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:26:19 -0600 Subject: [PATCH 27/86] 140.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index fcaba9244a..7eca221c57 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/110.test.js"], + "spec": ["./test/140.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From ad5f1f3843793a03a59f06ccc14a0c864416319e Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:49:41 +0000 Subject: [PATCH 28/86] Save progress: 140.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index ce28c22a4c..d675159b28 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -9,3 +9,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 25ae36f2bc..30242f17e2 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -39,3 +39,4 @@ ls --color=auto -l chmod +x questionnaire.sh ls --color=auto -l ./questionnaire.sh +ls --color=auto -l diff --git a/questionnaire.sh b/questionnaire.sh index f759f8e821..939ccda49d 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,3 +1,4 @@ echo hello questionnaire #!/bin/bash +ls -l From 620312f52ee90302c02a6388ac050755ea5344de Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:26:37 -0600 Subject: [PATCH 29/86] 150.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 7eca221c57..fa47d4f738 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/140.test.js"], + "spec": ["./test/150.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 74f56419af..7e99e8375d 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,3 +1,4 @@ #!/bin/bash -echo hello questionnaire \ No newline at end of file +echo hello questionnaire +ls -l From b0d90c32bb00e2c179476e336c07f572b310bedb Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:49:58 +0000 Subject: [PATCH 30/86] Save progress: 150.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index d675159b28..bb2c17e74f 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -10,3 +10,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 30242f17e2..80ee92443f 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -40,3 +40,4 @@ chmod +x questionnaire.sh ls --color=auto -l ./questionnaire.sh ls --color=auto -l +./questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh index 939ccda49d..3f9762beff 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -2,3 +2,4 @@ echo hello questionnaire #!/bin/bash ls -l + From 475b631958c966075e49f33ca2462baa2a787abe Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:26:59 -0600 Subject: [PATCH 31/86] 160.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index fa47d4f738..0c832c542a 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/150.test.js"], + "spec": ["./test/160.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 671d50bc38af7db1291a195c3d8b99fa9d956ec6 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 13:51:53 +0000 Subject: [PATCH 32/86] Save progress: 160.1 --- questionnaire.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/questionnaire.sh b/questionnaire.sh index 3f9762beff..f29b063e31 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,5 +1,3 @@ -echo hello questionnaire #!/bin/bash -ls -l From e6ea9bc27e9e930b7d5f6319aa8c0e7e8279753e Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:27:33 -0600 Subject: [PATCH 33/86] 170.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 0c832c542a..c9419733aa 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/160.test.js"], + "spec": ["./test/170.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 7e99e8375d..a9bf588e2f 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,4 +1 @@ #!/bin/bash - -echo hello questionnaire -ls -l From da7a4ecf54112218529e8f33d44e5f77571e1e21 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 14:02:08 +0000 Subject: [PATCH 34/86] Save progress: 170.1 --- questionnaire.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/questionnaire.sh b/questionnaire.sh index f29b063e31..dcf23afffd 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,3 +1,4 @@ #!/bin/bash +QUESTION1="What's your name?" From c1392c5113ea8b57b239bf3db196726e26168ae4 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:28:14 -0600 Subject: [PATCH 35/86] 180.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index c9419733aa..e7264f2354 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/170.test.js"], + "spec": ["./test/180.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index a9bf588e2f..77b9f62a3c 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1 +1,3 @@ #!/bin/bash + +QUESTION1="What's your name?" From 20a58ca3abb25a68fd047776c8a46eed0b573da9 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 14:02:37 +0000 Subject: [PATCH 36/86] Save progress: 180.1 --- questionnaire.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/questionnaire.sh b/questionnaire.sh index dcf23afffd..817a4bab2e 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -2,3 +2,5 @@ #!/bin/bash QUESTION1="What's your name?" + +echo $QUESTION1 \ No newline at end of file From 41867bf07f273cda0a02805145b8f8fc942cfd4b Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:30:04 -0600 Subject: [PATCH 37/86] 190.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index e7264f2354..c0c1108f22 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/180.test.js"], + "spec": ["./test/190.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 77b9f62a3c..340bccd4e1 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,3 +1,5 @@ #!/bin/bash QUESTION1="What's your name?" + +echo $QUESTION1 From 2c160532cc236659d78f1deedfa96ce0b46f9708 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 14:04:36 +0000 Subject: [PATCH 38/86] Save progress: 190.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index bb2c17e74f..b4366834d2 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -11,3 +11,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 80ee92443f..5bbab20c90 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -41,3 +41,4 @@ ls --color=auto -l ./questionnaire.sh ls --color=auto -l ./questionnaire.sh +./questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh index 817a4bab2e..736955815d 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -3,4 +3,4 @@ QUESTION1="What's your name?" -echo $QUESTION1 \ No newline at end of file +echo $QUESTION1 From a6e8f7036934b58a7ce0c7eb690eea16ceb3fdd1 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:31:29 -0600 Subject: [PATCH 39/86] 200.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index c0c1108f22..087d25d9b6 100644 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/190.test.js"], + "spec": ["./test/200.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 64848714d556b03a625e715d939c72dedbb92763 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:01:58 +0000 Subject: [PATCH 40/86] Save progress: 200.1 --- .freeCodeCamp/.mocharc.json | 0 .freeCodeCamp/package-lock.json | 0 .freeCodeCamp/package.json | 0 .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 31 +++++++++++++++++++++++++++++++ .freeCodeCamp/test/10.test.js | 0 .freeCodeCamp/test/100.test.js | 0 .freeCodeCamp/test/1000.test.js | 0 .freeCodeCamp/test/1010.test.js | 0 .freeCodeCamp/test/1020.test.js | 0 .freeCodeCamp/test/1030.test.js | 0 .freeCodeCamp/test/1040.test.js | 0 .freeCodeCamp/test/1050.test.js | 0 .freeCodeCamp/test/1060.test.js | 0 .freeCodeCamp/test/1070.test.js | 0 .freeCodeCamp/test/1080.test.js | 0 .freeCodeCamp/test/1090.test.js | 0 .freeCodeCamp/test/110.test.js | 0 .freeCodeCamp/test/1100.test.js | 0 .freeCodeCamp/test/1110.test.js | 0 .freeCodeCamp/test/1120.test.js | 0 .freeCodeCamp/test/1130.test.js | 0 .freeCodeCamp/test/1140.test.js | 0 .freeCodeCamp/test/1150.test.js | 0 .freeCodeCamp/test/1160.test.js | 0 .freeCodeCamp/test/1170.test.js | 0 .freeCodeCamp/test/1180.test.js | 0 .freeCodeCamp/test/1190.test.js | 0 .freeCodeCamp/test/1200.test.js | 0 .freeCodeCamp/test/1210.test.js | 0 .freeCodeCamp/test/1220.test.js | 0 .freeCodeCamp/test/1230.test.js | 0 .freeCodeCamp/test/1240.test.js | 0 .freeCodeCamp/test/1250.test.js | 0 .freeCodeCamp/test/1260.test.js | 0 .freeCodeCamp/test/1270.test.js | 0 .freeCodeCamp/test/1280.test.js | 0 .freeCodeCamp/test/1290.test.js | 0 .freeCodeCamp/test/1300.test.js | 0 .freeCodeCamp/test/1310.test.js | 0 .freeCodeCamp/test/1320.test.js | 0 .freeCodeCamp/test/1330.test.js | 0 .freeCodeCamp/test/1340.test.js | 0 .freeCodeCamp/test/1350.test.js | 0 .freeCodeCamp/test/1360.test.js | 0 .freeCodeCamp/test/1370.test.js | 0 .freeCodeCamp/test/1380.test.js | 0 .freeCodeCamp/test/1385.test.js | 0 .freeCodeCamp/test/1390.test.js | 0 .freeCodeCamp/test/140.test.js | 0 .freeCodeCamp/test/1400.test.js | 0 .freeCodeCamp/test/1410.test.js | 0 .freeCodeCamp/test/1412.test.js | 0 .freeCodeCamp/test/1413.test.js | 0 .freeCodeCamp/test/1416.test.js | 0 .freeCodeCamp/test/1420.test.js | 0 .freeCodeCamp/test/1425.test.js | 0 .freeCodeCamp/test/1428.test.js | 0 .freeCodeCamp/test/1430.test.js | 0 .freeCodeCamp/test/1440.test.js | 0 .freeCodeCamp/test/1450.test.js | 0 .freeCodeCamp/test/1460.test.js | 0 .freeCodeCamp/test/1470.test.js | 0 .freeCodeCamp/test/1480.test.js | 0 .freeCodeCamp/test/1490.test.js | 0 .freeCodeCamp/test/150.test.js | 0 .freeCodeCamp/test/1500.test.js | 0 .freeCodeCamp/test/1510.test.js | 0 .freeCodeCamp/test/1520.test.js | 0 .freeCodeCamp/test/1530.test.js | 0 .freeCodeCamp/test/1540.test.js | 0 .freeCodeCamp/test/1550.test.js | 0 .freeCodeCamp/test/1560.test.js | 0 .freeCodeCamp/test/1570.test.js | 0 .freeCodeCamp/test/1580.test.js | 0 .freeCodeCamp/test/1590.test.js | 0 .freeCodeCamp/test/160.test.js | 0 .freeCodeCamp/test/1600.test.js | 0 .freeCodeCamp/test/1610.test.js | 0 .freeCodeCamp/test/170.test.js | 0 .freeCodeCamp/test/180.test.js | 0 .freeCodeCamp/test/190.test.js | 0 .freeCodeCamp/test/20.test.js | 0 .freeCodeCamp/test/200.test.js | 0 .freeCodeCamp/test/210.test.js | 0 .freeCodeCamp/test/220.test.js | 0 .freeCodeCamp/test/230.test.js | 0 .freeCodeCamp/test/240.test.js | 0 .freeCodeCamp/test/250.test.js | 0 .freeCodeCamp/test/260.test.js | 0 .freeCodeCamp/test/270.test.js | 0 .freeCodeCamp/test/280.test.js | 0 .freeCodeCamp/test/290.test.js | 0 .freeCodeCamp/test/30.test.js | 0 .freeCodeCamp/test/300.test.js | 0 .freeCodeCamp/test/310.test.js | 0 .freeCodeCamp/test/320.test.js | 0 .freeCodeCamp/test/323.test.js | 0 .freeCodeCamp/test/326.test.js | 0 .freeCodeCamp/test/330.test.js | 0 .freeCodeCamp/test/340.test.js | 0 .freeCodeCamp/test/345.test.js | 0 .freeCodeCamp/test/35.test.js | 0 .freeCodeCamp/test/350.test.js | 0 .freeCodeCamp/test/360.test.js | 0 .freeCodeCamp/test/363.test.js | 0 .freeCodeCamp/test/366.test.js | 0 .freeCodeCamp/test/370.test.js | 0 .freeCodeCamp/test/380.test.js | 0 .freeCodeCamp/test/390.test.js | 0 .freeCodeCamp/test/40.test.js | 0 .freeCodeCamp/test/400.test.js | 0 .freeCodeCamp/test/410.test.js | 0 .freeCodeCamp/test/420.test.js | 0 .freeCodeCamp/test/425.test.js | 0 .freeCodeCamp/test/430.test.js | 0 .freeCodeCamp/test/440.test.js | 0 .freeCodeCamp/test/450.test.js | 0 .freeCodeCamp/test/460.test.js | 0 .freeCodeCamp/test/470.test.js | 0 .freeCodeCamp/test/480.test.js | 0 .freeCodeCamp/test/490.test.js | 0 .freeCodeCamp/test/50.test.js | 0 .freeCodeCamp/test/500.test.js | 0 .freeCodeCamp/test/505.test.js | 0 .freeCodeCamp/test/510.test.js | 0 .freeCodeCamp/test/520.test.js | 0 .freeCodeCamp/test/530.test.js | 0 .freeCodeCamp/test/540.test.js | 0 .freeCodeCamp/test/542.test.js | 0 .freeCodeCamp/test/544.test.js | 0 .freeCodeCamp/test/546.test.js | 0 .freeCodeCamp/test/548.test.js | 0 .freeCodeCamp/test/550.test.js | 0 .freeCodeCamp/test/552.test.js | 0 .freeCodeCamp/test/554.test.js | 0 .freeCodeCamp/test/556.test.js | 0 .freeCodeCamp/test/558.test.js | 0 .freeCodeCamp/test/560.test.js | 0 .freeCodeCamp/test/562.test.js | 0 .freeCodeCamp/test/564.test.js | 0 .freeCodeCamp/test/566.test.js | 0 .freeCodeCamp/test/568.test.js | 0 .freeCodeCamp/test/570.test.js | 0 .freeCodeCamp/test/572.test.js | 0 .freeCodeCamp/test/574.test.js | 0 .freeCodeCamp/test/575.test.js | 0 .freeCodeCamp/test/576.test.js | 0 .freeCodeCamp/test/582.test.js | 0 .freeCodeCamp/test/584.test.js | 0 .freeCodeCamp/test/586.test.js | 0 .freeCodeCamp/test/588.test.js | 0 .freeCodeCamp/test/590.test.js | 0 .freeCodeCamp/test/60.test.js | 0 .freeCodeCamp/test/600.test.js | 0 .freeCodeCamp/test/610.test.js | 0 .freeCodeCamp/test/615.test.js | 0 .freeCodeCamp/test/620.test.js | 0 .freeCodeCamp/test/630.test.js | 0 .freeCodeCamp/test/640.test.js | 0 .freeCodeCamp/test/650.test.js | 0 .freeCodeCamp/test/660.test.js | 0 .freeCodeCamp/test/670.test.js | 0 .freeCodeCamp/test/675.test.js | 0 .freeCodeCamp/test/680.test.js | 0 .freeCodeCamp/test/690.test.js | 0 .freeCodeCamp/test/692.test.js | 0 .freeCodeCamp/test/694.test.js | 0 .freeCodeCamp/test/696.test.js | 0 .freeCodeCamp/test/698.test.js | 0 .freeCodeCamp/test/70.test.js | 0 .freeCodeCamp/test/700.test.js | 0 .freeCodeCamp/test/710.test.js | 0 .freeCodeCamp/test/730.test.js | 0 .freeCodeCamp/test/740.test.js | 0 .freeCodeCamp/test/750.test.js | 0 .freeCodeCamp/test/760.test.js | 0 .freeCodeCamp/test/770.test.js | 0 .freeCodeCamp/test/780.test.js | 0 .freeCodeCamp/test/790.test.js | 0 .freeCodeCamp/test/80.test.js | 0 .freeCodeCamp/test/800.test.js | 0 .freeCodeCamp/test/810.test.js | 0 .freeCodeCamp/test/815.test.js | 0 .freeCodeCamp/test/817.test.js | 0 .freeCodeCamp/test/818.test.js | 0 .freeCodeCamp/test/819.test.js | 0 .freeCodeCamp/test/820.test.js | 0 .freeCodeCamp/test/822.test.js | 0 .freeCodeCamp/test/824.test.js | 0 .freeCodeCamp/test/826.test.js | 0 .freeCodeCamp/test/828.test.js | 0 .freeCodeCamp/test/830.test.js | 0 .freeCodeCamp/test/835.test.js | 0 .freeCodeCamp/test/840.test.js | 0 .freeCodeCamp/test/881.test.js | 0 .freeCodeCamp/test/884.test.js | 0 .freeCodeCamp/test/887.test.js | 0 .freeCodeCamp/test/890.test.js | 0 .freeCodeCamp/test/891.test.js | 0 .freeCodeCamp/test/893.test.js | 0 .freeCodeCamp/test/896.test.js | 0 .freeCodeCamp/test/897.test.js | 0 .freeCodeCamp/test/899.test.js | 0 .freeCodeCamp/test/90.test.js | 0 .freeCodeCamp/test/902.test.js | 0 .freeCodeCamp/test/905.test.js | 0 .freeCodeCamp/test/908.test.js | 0 .freeCodeCamp/test/911.test.js | 0 .freeCodeCamp/test/912.test.js | 0 .freeCodeCamp/test/913.test.js | 0 .freeCodeCamp/test/914.test.js | 0 .freeCodeCamp/test/916.test.js | 0 .freeCodeCamp/test/918.test.js | 0 .freeCodeCamp/test/920.test.js | 0 .freeCodeCamp/test/928.test.js | 0 .freeCodeCamp/test/930.test.js | 0 .freeCodeCamp/test/940.test.js | 0 .freeCodeCamp/test/945.test.js | 0 .freeCodeCamp/test/950.test.js | 0 .freeCodeCamp/test/960.test.js | 0 .freeCodeCamp/test/970.test.js | 0 .freeCodeCamp/test/980.test.js | 0 .freeCodeCamp/test/990.test.js | 0 .freeCodeCamp/test/utils.js | 0 questionnaire.sh | 2 +- 226 files changed, 33 insertions(+), 1 deletion(-) mode change 100644 => 100755 .freeCodeCamp/.mocharc.json mode change 100644 => 100755 .freeCodeCamp/package-lock.json mode change 100644 => 100755 .freeCodeCamp/package.json mode change 100644 => 100755 .freeCodeCamp/test/10.test.js mode change 100644 => 100755 .freeCodeCamp/test/100.test.js mode change 100644 => 100755 .freeCodeCamp/test/1000.test.js mode change 100644 => 100755 .freeCodeCamp/test/1010.test.js mode change 100644 => 100755 .freeCodeCamp/test/1020.test.js mode change 100644 => 100755 .freeCodeCamp/test/1030.test.js mode change 100644 => 100755 .freeCodeCamp/test/1040.test.js mode change 100644 => 100755 .freeCodeCamp/test/1050.test.js mode change 100644 => 100755 .freeCodeCamp/test/1060.test.js mode change 100644 => 100755 .freeCodeCamp/test/1070.test.js mode change 100644 => 100755 .freeCodeCamp/test/1080.test.js mode change 100644 => 100755 .freeCodeCamp/test/1090.test.js mode change 100644 => 100755 .freeCodeCamp/test/110.test.js mode change 100644 => 100755 .freeCodeCamp/test/1100.test.js mode change 100644 => 100755 .freeCodeCamp/test/1110.test.js mode change 100644 => 100755 .freeCodeCamp/test/1120.test.js mode change 100644 => 100755 .freeCodeCamp/test/1130.test.js mode change 100644 => 100755 .freeCodeCamp/test/1140.test.js mode change 100644 => 100755 .freeCodeCamp/test/1150.test.js mode change 100644 => 100755 .freeCodeCamp/test/1160.test.js mode change 100644 => 100755 .freeCodeCamp/test/1170.test.js mode change 100644 => 100755 .freeCodeCamp/test/1180.test.js mode change 100644 => 100755 .freeCodeCamp/test/1190.test.js mode change 100644 => 100755 .freeCodeCamp/test/1200.test.js mode change 100644 => 100755 .freeCodeCamp/test/1210.test.js mode change 100644 => 100755 .freeCodeCamp/test/1220.test.js mode change 100644 => 100755 .freeCodeCamp/test/1230.test.js mode change 100644 => 100755 .freeCodeCamp/test/1240.test.js mode change 100644 => 100755 .freeCodeCamp/test/1250.test.js mode change 100644 => 100755 .freeCodeCamp/test/1260.test.js mode change 100644 => 100755 .freeCodeCamp/test/1270.test.js mode change 100644 => 100755 .freeCodeCamp/test/1280.test.js mode change 100644 => 100755 .freeCodeCamp/test/1290.test.js mode change 100644 => 100755 .freeCodeCamp/test/1300.test.js mode change 100644 => 100755 .freeCodeCamp/test/1310.test.js mode change 100644 => 100755 .freeCodeCamp/test/1320.test.js mode change 100644 => 100755 .freeCodeCamp/test/1330.test.js mode change 100644 => 100755 .freeCodeCamp/test/1340.test.js mode change 100644 => 100755 .freeCodeCamp/test/1350.test.js mode change 100644 => 100755 .freeCodeCamp/test/1360.test.js mode change 100644 => 100755 .freeCodeCamp/test/1370.test.js mode change 100644 => 100755 .freeCodeCamp/test/1380.test.js mode change 100644 => 100755 .freeCodeCamp/test/1385.test.js mode change 100644 => 100755 .freeCodeCamp/test/1390.test.js mode change 100644 => 100755 .freeCodeCamp/test/140.test.js mode change 100644 => 100755 .freeCodeCamp/test/1400.test.js mode change 100644 => 100755 .freeCodeCamp/test/1410.test.js mode change 100644 => 100755 .freeCodeCamp/test/1412.test.js mode change 100644 => 100755 .freeCodeCamp/test/1413.test.js mode change 100644 => 100755 .freeCodeCamp/test/1416.test.js mode change 100644 => 100755 .freeCodeCamp/test/1420.test.js mode change 100644 => 100755 .freeCodeCamp/test/1425.test.js mode change 100644 => 100755 .freeCodeCamp/test/1428.test.js mode change 100644 => 100755 .freeCodeCamp/test/1430.test.js mode change 100644 => 100755 .freeCodeCamp/test/1440.test.js mode change 100644 => 100755 .freeCodeCamp/test/1450.test.js mode change 100644 => 100755 .freeCodeCamp/test/1460.test.js mode change 100644 => 100755 .freeCodeCamp/test/1470.test.js mode change 100644 => 100755 .freeCodeCamp/test/1480.test.js mode change 100644 => 100755 .freeCodeCamp/test/1490.test.js mode change 100644 => 100755 .freeCodeCamp/test/150.test.js mode change 100644 => 100755 .freeCodeCamp/test/1500.test.js mode change 100644 => 100755 .freeCodeCamp/test/1510.test.js mode change 100644 => 100755 .freeCodeCamp/test/1520.test.js mode change 100644 => 100755 .freeCodeCamp/test/1530.test.js mode change 100644 => 100755 .freeCodeCamp/test/1540.test.js mode change 100644 => 100755 .freeCodeCamp/test/1550.test.js mode change 100644 => 100755 .freeCodeCamp/test/1560.test.js mode change 100644 => 100755 .freeCodeCamp/test/1570.test.js mode change 100644 => 100755 .freeCodeCamp/test/1580.test.js mode change 100644 => 100755 .freeCodeCamp/test/1590.test.js mode change 100644 => 100755 .freeCodeCamp/test/160.test.js mode change 100644 => 100755 .freeCodeCamp/test/1600.test.js mode change 100644 => 100755 .freeCodeCamp/test/1610.test.js mode change 100644 => 100755 .freeCodeCamp/test/170.test.js mode change 100644 => 100755 .freeCodeCamp/test/180.test.js mode change 100644 => 100755 .freeCodeCamp/test/190.test.js mode change 100644 => 100755 .freeCodeCamp/test/20.test.js mode change 100644 => 100755 .freeCodeCamp/test/200.test.js mode change 100644 => 100755 .freeCodeCamp/test/210.test.js mode change 100644 => 100755 .freeCodeCamp/test/220.test.js mode change 100644 => 100755 .freeCodeCamp/test/230.test.js mode change 100644 => 100755 .freeCodeCamp/test/240.test.js mode change 100644 => 100755 .freeCodeCamp/test/250.test.js mode change 100644 => 100755 .freeCodeCamp/test/260.test.js mode change 100644 => 100755 .freeCodeCamp/test/270.test.js mode change 100644 => 100755 .freeCodeCamp/test/280.test.js mode change 100644 => 100755 .freeCodeCamp/test/290.test.js mode change 100644 => 100755 .freeCodeCamp/test/30.test.js mode change 100644 => 100755 .freeCodeCamp/test/300.test.js mode change 100644 => 100755 .freeCodeCamp/test/310.test.js mode change 100644 => 100755 .freeCodeCamp/test/320.test.js mode change 100644 => 100755 .freeCodeCamp/test/323.test.js mode change 100644 => 100755 .freeCodeCamp/test/326.test.js mode change 100644 => 100755 .freeCodeCamp/test/330.test.js mode change 100644 => 100755 .freeCodeCamp/test/340.test.js mode change 100644 => 100755 .freeCodeCamp/test/345.test.js mode change 100644 => 100755 .freeCodeCamp/test/35.test.js mode change 100644 => 100755 .freeCodeCamp/test/350.test.js mode change 100644 => 100755 .freeCodeCamp/test/360.test.js mode change 100644 => 100755 .freeCodeCamp/test/363.test.js mode change 100644 => 100755 .freeCodeCamp/test/366.test.js mode change 100644 => 100755 .freeCodeCamp/test/370.test.js mode change 100644 => 100755 .freeCodeCamp/test/380.test.js mode change 100644 => 100755 .freeCodeCamp/test/390.test.js mode change 100644 => 100755 .freeCodeCamp/test/40.test.js mode change 100644 => 100755 .freeCodeCamp/test/400.test.js mode change 100644 => 100755 .freeCodeCamp/test/410.test.js mode change 100644 => 100755 .freeCodeCamp/test/420.test.js mode change 100644 => 100755 .freeCodeCamp/test/425.test.js mode change 100644 => 100755 .freeCodeCamp/test/430.test.js mode change 100644 => 100755 .freeCodeCamp/test/440.test.js mode change 100644 => 100755 .freeCodeCamp/test/450.test.js mode change 100644 => 100755 .freeCodeCamp/test/460.test.js mode change 100644 => 100755 .freeCodeCamp/test/470.test.js mode change 100644 => 100755 .freeCodeCamp/test/480.test.js mode change 100644 => 100755 .freeCodeCamp/test/490.test.js mode change 100644 => 100755 .freeCodeCamp/test/50.test.js mode change 100644 => 100755 .freeCodeCamp/test/500.test.js mode change 100644 => 100755 .freeCodeCamp/test/505.test.js mode change 100644 => 100755 .freeCodeCamp/test/510.test.js mode change 100644 => 100755 .freeCodeCamp/test/520.test.js mode change 100644 => 100755 .freeCodeCamp/test/530.test.js mode change 100644 => 100755 .freeCodeCamp/test/540.test.js mode change 100644 => 100755 .freeCodeCamp/test/542.test.js mode change 100644 => 100755 .freeCodeCamp/test/544.test.js mode change 100644 => 100755 .freeCodeCamp/test/546.test.js mode change 100644 => 100755 .freeCodeCamp/test/548.test.js mode change 100644 => 100755 .freeCodeCamp/test/550.test.js mode change 100644 => 100755 .freeCodeCamp/test/552.test.js mode change 100644 => 100755 .freeCodeCamp/test/554.test.js mode change 100644 => 100755 .freeCodeCamp/test/556.test.js mode change 100644 => 100755 .freeCodeCamp/test/558.test.js mode change 100644 => 100755 .freeCodeCamp/test/560.test.js mode change 100644 => 100755 .freeCodeCamp/test/562.test.js mode change 100644 => 100755 .freeCodeCamp/test/564.test.js mode change 100644 => 100755 .freeCodeCamp/test/566.test.js mode change 100644 => 100755 .freeCodeCamp/test/568.test.js mode change 100644 => 100755 .freeCodeCamp/test/570.test.js mode change 100644 => 100755 .freeCodeCamp/test/572.test.js mode change 100644 => 100755 .freeCodeCamp/test/574.test.js mode change 100644 => 100755 .freeCodeCamp/test/575.test.js mode change 100644 => 100755 .freeCodeCamp/test/576.test.js mode change 100644 => 100755 .freeCodeCamp/test/582.test.js mode change 100644 => 100755 .freeCodeCamp/test/584.test.js mode change 100644 => 100755 .freeCodeCamp/test/586.test.js mode change 100644 => 100755 .freeCodeCamp/test/588.test.js mode change 100644 => 100755 .freeCodeCamp/test/590.test.js mode change 100644 => 100755 .freeCodeCamp/test/60.test.js mode change 100644 => 100755 .freeCodeCamp/test/600.test.js mode change 100644 => 100755 .freeCodeCamp/test/610.test.js mode change 100644 => 100755 .freeCodeCamp/test/615.test.js mode change 100644 => 100755 .freeCodeCamp/test/620.test.js mode change 100644 => 100755 .freeCodeCamp/test/630.test.js mode change 100644 => 100755 .freeCodeCamp/test/640.test.js mode change 100644 => 100755 .freeCodeCamp/test/650.test.js mode change 100644 => 100755 .freeCodeCamp/test/660.test.js mode change 100644 => 100755 .freeCodeCamp/test/670.test.js mode change 100644 => 100755 .freeCodeCamp/test/675.test.js mode change 100644 => 100755 .freeCodeCamp/test/680.test.js mode change 100644 => 100755 .freeCodeCamp/test/690.test.js mode change 100644 => 100755 .freeCodeCamp/test/692.test.js mode change 100644 => 100755 .freeCodeCamp/test/694.test.js mode change 100644 => 100755 .freeCodeCamp/test/696.test.js mode change 100644 => 100755 .freeCodeCamp/test/698.test.js mode change 100644 => 100755 .freeCodeCamp/test/70.test.js mode change 100644 => 100755 .freeCodeCamp/test/700.test.js mode change 100644 => 100755 .freeCodeCamp/test/710.test.js mode change 100644 => 100755 .freeCodeCamp/test/730.test.js mode change 100644 => 100755 .freeCodeCamp/test/740.test.js mode change 100644 => 100755 .freeCodeCamp/test/750.test.js mode change 100644 => 100755 .freeCodeCamp/test/760.test.js mode change 100644 => 100755 .freeCodeCamp/test/770.test.js mode change 100644 => 100755 .freeCodeCamp/test/780.test.js mode change 100644 => 100755 .freeCodeCamp/test/790.test.js mode change 100644 => 100755 .freeCodeCamp/test/80.test.js mode change 100644 => 100755 .freeCodeCamp/test/800.test.js mode change 100644 => 100755 .freeCodeCamp/test/810.test.js mode change 100644 => 100755 .freeCodeCamp/test/815.test.js mode change 100644 => 100755 .freeCodeCamp/test/817.test.js mode change 100644 => 100755 .freeCodeCamp/test/818.test.js mode change 100644 => 100755 .freeCodeCamp/test/819.test.js mode change 100644 => 100755 .freeCodeCamp/test/820.test.js mode change 100644 => 100755 .freeCodeCamp/test/822.test.js mode change 100644 => 100755 .freeCodeCamp/test/824.test.js mode change 100644 => 100755 .freeCodeCamp/test/826.test.js mode change 100644 => 100755 .freeCodeCamp/test/828.test.js mode change 100644 => 100755 .freeCodeCamp/test/830.test.js mode change 100644 => 100755 .freeCodeCamp/test/835.test.js mode change 100644 => 100755 .freeCodeCamp/test/840.test.js mode change 100644 => 100755 .freeCodeCamp/test/881.test.js mode change 100644 => 100755 .freeCodeCamp/test/884.test.js mode change 100644 => 100755 .freeCodeCamp/test/887.test.js mode change 100644 => 100755 .freeCodeCamp/test/890.test.js mode change 100644 => 100755 .freeCodeCamp/test/891.test.js mode change 100644 => 100755 .freeCodeCamp/test/893.test.js mode change 100644 => 100755 .freeCodeCamp/test/896.test.js mode change 100644 => 100755 .freeCodeCamp/test/897.test.js mode change 100644 => 100755 .freeCodeCamp/test/899.test.js mode change 100644 => 100755 .freeCodeCamp/test/90.test.js mode change 100644 => 100755 .freeCodeCamp/test/902.test.js mode change 100644 => 100755 .freeCodeCamp/test/905.test.js mode change 100644 => 100755 .freeCodeCamp/test/908.test.js mode change 100644 => 100755 .freeCodeCamp/test/911.test.js mode change 100644 => 100755 .freeCodeCamp/test/912.test.js mode change 100644 => 100755 .freeCodeCamp/test/913.test.js mode change 100644 => 100755 .freeCodeCamp/test/914.test.js mode change 100644 => 100755 .freeCodeCamp/test/916.test.js mode change 100644 => 100755 .freeCodeCamp/test/918.test.js mode change 100644 => 100755 .freeCodeCamp/test/920.test.js mode change 100644 => 100755 .freeCodeCamp/test/928.test.js mode change 100644 => 100755 .freeCodeCamp/test/930.test.js mode change 100644 => 100755 .freeCodeCamp/test/940.test.js mode change 100644 => 100755 .freeCodeCamp/test/945.test.js mode change 100644 => 100755 .freeCodeCamp/test/950.test.js mode change 100644 => 100755 .freeCodeCamp/test/960.test.js mode change 100644 => 100755 .freeCodeCamp/test/970.test.js mode change 100644 => 100755 .freeCodeCamp/test/980.test.js mode change 100644 => 100755 .freeCodeCamp/test/990.test.js mode change 100644 => 100755 .freeCodeCamp/test/utils.js diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/package-lock.json b/.freeCodeCamp/package-lock.json old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/package.json b/.freeCodeCamp/package.json old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index b4366834d2..5e791b3269 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -12,3 +12,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 5bbab20c90..11c62afbce 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -42,3 +42,34 @@ ls --color=auto -l ls --color=auto -l ./questionnaire.sh ./questionnaire.sh +builtin unset VSCODE_INJECTION +[ -z "$VSCODE_SHELL_INTEGRATION" ] +[ -n "${VSCODE_ENV_REPLACE:-}" ] +[ -n "${VSCODE_ENV_PREPEND:-}" ] +[ -n "${VSCODE_ENV_APPEND:-}" ] +__vsc_regex_environment="^CYGWIN*|MINGW*|MSYS*" +[[ "$(uname -s)" =~ $__vsc_regex_environment ]] +__vsc_is_windows=0 +__vsc_regex_histcontrol=".*(erasedups|ignoreboth|ignoredups).*" +[[ "$HISTCONTROL" =~ $__vsc_regex_histcontrol ]] +__vsc_history_verify=1 +builtin unset __vsc_regex_environment +builtin unset __vsc_regex_histcontrol +__vsc_initialized=0 +__vsc_original_PS1="$PS1" +__vsc_original_PS2="$PS2" +__vsc_custom_PS1="" +__vsc_custom_PS2="" +__vsc_in_command_execution="1" +__vsc_current_command="" +__vsc_nonce="$VSCODE_NONCE" +unset VSCODE_NONCE +__vsc_stable="$VSCODE_STABLE" +unset VSCODE_STABLE +[ "$__vsc_stable" = "0" ] +[[ -n "${bash_preexec_imported:-}" ]] +__vsc_dbg_trap="$(__vsc_get_trap DEBUG)" +[[ -z "$__vsc_dbg_trap" ]] +[[ "$__vsc_dbg_trap" != '__vsc_preexec "$_"' && "$__vsc_dbg_trap" != '__vsc_preexec_all "$_"' ]] +trap '__vsc_preexec_all "$_"' DEBUG +__vsc_original_prompt_command=${PROMPT_COMMAND:-} diff --git a/.freeCodeCamp/test/10.test.js b/.freeCodeCamp/test/10.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/100.test.js b/.freeCodeCamp/test/100.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1000.test.js b/.freeCodeCamp/test/1000.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1010.test.js b/.freeCodeCamp/test/1010.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1020.test.js b/.freeCodeCamp/test/1020.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1030.test.js b/.freeCodeCamp/test/1030.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1040.test.js b/.freeCodeCamp/test/1040.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1050.test.js b/.freeCodeCamp/test/1050.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1060.test.js b/.freeCodeCamp/test/1060.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1070.test.js b/.freeCodeCamp/test/1070.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1080.test.js b/.freeCodeCamp/test/1080.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1090.test.js b/.freeCodeCamp/test/1090.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/110.test.js b/.freeCodeCamp/test/110.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1100.test.js b/.freeCodeCamp/test/1100.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1110.test.js b/.freeCodeCamp/test/1110.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1120.test.js b/.freeCodeCamp/test/1120.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1130.test.js b/.freeCodeCamp/test/1130.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1140.test.js b/.freeCodeCamp/test/1140.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1150.test.js b/.freeCodeCamp/test/1150.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1160.test.js b/.freeCodeCamp/test/1160.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1170.test.js b/.freeCodeCamp/test/1170.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1180.test.js b/.freeCodeCamp/test/1180.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1190.test.js b/.freeCodeCamp/test/1190.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1200.test.js b/.freeCodeCamp/test/1200.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1210.test.js b/.freeCodeCamp/test/1210.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1220.test.js b/.freeCodeCamp/test/1220.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1230.test.js b/.freeCodeCamp/test/1230.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1240.test.js b/.freeCodeCamp/test/1240.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1250.test.js b/.freeCodeCamp/test/1250.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1260.test.js b/.freeCodeCamp/test/1260.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1270.test.js b/.freeCodeCamp/test/1270.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1280.test.js b/.freeCodeCamp/test/1280.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1290.test.js b/.freeCodeCamp/test/1290.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1300.test.js b/.freeCodeCamp/test/1300.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1310.test.js b/.freeCodeCamp/test/1310.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1320.test.js b/.freeCodeCamp/test/1320.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1330.test.js b/.freeCodeCamp/test/1330.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1340.test.js b/.freeCodeCamp/test/1340.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1350.test.js b/.freeCodeCamp/test/1350.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1360.test.js b/.freeCodeCamp/test/1360.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1370.test.js b/.freeCodeCamp/test/1370.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1380.test.js b/.freeCodeCamp/test/1380.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1385.test.js b/.freeCodeCamp/test/1385.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1390.test.js b/.freeCodeCamp/test/1390.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/140.test.js b/.freeCodeCamp/test/140.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1400.test.js b/.freeCodeCamp/test/1400.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1410.test.js b/.freeCodeCamp/test/1410.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1412.test.js b/.freeCodeCamp/test/1412.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1413.test.js b/.freeCodeCamp/test/1413.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1416.test.js b/.freeCodeCamp/test/1416.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1420.test.js b/.freeCodeCamp/test/1420.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1425.test.js b/.freeCodeCamp/test/1425.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1428.test.js b/.freeCodeCamp/test/1428.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1430.test.js b/.freeCodeCamp/test/1430.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1440.test.js b/.freeCodeCamp/test/1440.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1450.test.js b/.freeCodeCamp/test/1450.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1460.test.js b/.freeCodeCamp/test/1460.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1470.test.js b/.freeCodeCamp/test/1470.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1480.test.js b/.freeCodeCamp/test/1480.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1490.test.js b/.freeCodeCamp/test/1490.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/150.test.js b/.freeCodeCamp/test/150.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1500.test.js b/.freeCodeCamp/test/1500.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1510.test.js b/.freeCodeCamp/test/1510.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1520.test.js b/.freeCodeCamp/test/1520.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1530.test.js b/.freeCodeCamp/test/1530.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1540.test.js b/.freeCodeCamp/test/1540.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1550.test.js b/.freeCodeCamp/test/1550.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1560.test.js b/.freeCodeCamp/test/1560.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1570.test.js b/.freeCodeCamp/test/1570.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1580.test.js b/.freeCodeCamp/test/1580.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1590.test.js b/.freeCodeCamp/test/1590.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/160.test.js b/.freeCodeCamp/test/160.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1600.test.js b/.freeCodeCamp/test/1600.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/1610.test.js b/.freeCodeCamp/test/1610.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/170.test.js b/.freeCodeCamp/test/170.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/180.test.js b/.freeCodeCamp/test/180.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/190.test.js b/.freeCodeCamp/test/190.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/20.test.js b/.freeCodeCamp/test/20.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/200.test.js b/.freeCodeCamp/test/200.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/210.test.js b/.freeCodeCamp/test/210.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/220.test.js b/.freeCodeCamp/test/220.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/230.test.js b/.freeCodeCamp/test/230.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/240.test.js b/.freeCodeCamp/test/240.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/250.test.js b/.freeCodeCamp/test/250.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/260.test.js b/.freeCodeCamp/test/260.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/270.test.js b/.freeCodeCamp/test/270.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/280.test.js b/.freeCodeCamp/test/280.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/290.test.js b/.freeCodeCamp/test/290.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/30.test.js b/.freeCodeCamp/test/30.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/300.test.js b/.freeCodeCamp/test/300.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/310.test.js b/.freeCodeCamp/test/310.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/320.test.js b/.freeCodeCamp/test/320.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/323.test.js b/.freeCodeCamp/test/323.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/326.test.js b/.freeCodeCamp/test/326.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/330.test.js b/.freeCodeCamp/test/330.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/340.test.js b/.freeCodeCamp/test/340.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/345.test.js b/.freeCodeCamp/test/345.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/35.test.js b/.freeCodeCamp/test/35.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/350.test.js b/.freeCodeCamp/test/350.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/360.test.js b/.freeCodeCamp/test/360.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/363.test.js b/.freeCodeCamp/test/363.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/366.test.js b/.freeCodeCamp/test/366.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/370.test.js b/.freeCodeCamp/test/370.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/380.test.js b/.freeCodeCamp/test/380.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/390.test.js b/.freeCodeCamp/test/390.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/40.test.js b/.freeCodeCamp/test/40.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/400.test.js b/.freeCodeCamp/test/400.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/410.test.js b/.freeCodeCamp/test/410.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/420.test.js b/.freeCodeCamp/test/420.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/425.test.js b/.freeCodeCamp/test/425.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/430.test.js b/.freeCodeCamp/test/430.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/440.test.js b/.freeCodeCamp/test/440.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/450.test.js b/.freeCodeCamp/test/450.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/460.test.js b/.freeCodeCamp/test/460.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/470.test.js b/.freeCodeCamp/test/470.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/480.test.js b/.freeCodeCamp/test/480.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/490.test.js b/.freeCodeCamp/test/490.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/50.test.js b/.freeCodeCamp/test/50.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/500.test.js b/.freeCodeCamp/test/500.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/505.test.js b/.freeCodeCamp/test/505.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/510.test.js b/.freeCodeCamp/test/510.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/520.test.js b/.freeCodeCamp/test/520.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/530.test.js b/.freeCodeCamp/test/530.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/540.test.js b/.freeCodeCamp/test/540.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/542.test.js b/.freeCodeCamp/test/542.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/544.test.js b/.freeCodeCamp/test/544.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/546.test.js b/.freeCodeCamp/test/546.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/548.test.js b/.freeCodeCamp/test/548.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/550.test.js b/.freeCodeCamp/test/550.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/552.test.js b/.freeCodeCamp/test/552.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/554.test.js b/.freeCodeCamp/test/554.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/556.test.js b/.freeCodeCamp/test/556.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/558.test.js b/.freeCodeCamp/test/558.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/560.test.js b/.freeCodeCamp/test/560.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/562.test.js b/.freeCodeCamp/test/562.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/564.test.js b/.freeCodeCamp/test/564.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/566.test.js b/.freeCodeCamp/test/566.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/568.test.js b/.freeCodeCamp/test/568.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/570.test.js b/.freeCodeCamp/test/570.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/572.test.js b/.freeCodeCamp/test/572.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/574.test.js b/.freeCodeCamp/test/574.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/575.test.js b/.freeCodeCamp/test/575.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/576.test.js b/.freeCodeCamp/test/576.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/582.test.js b/.freeCodeCamp/test/582.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/584.test.js b/.freeCodeCamp/test/584.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/586.test.js b/.freeCodeCamp/test/586.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/588.test.js b/.freeCodeCamp/test/588.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/590.test.js b/.freeCodeCamp/test/590.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/60.test.js b/.freeCodeCamp/test/60.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/600.test.js b/.freeCodeCamp/test/600.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/610.test.js b/.freeCodeCamp/test/610.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/615.test.js b/.freeCodeCamp/test/615.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/620.test.js b/.freeCodeCamp/test/620.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/630.test.js b/.freeCodeCamp/test/630.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/640.test.js b/.freeCodeCamp/test/640.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/650.test.js b/.freeCodeCamp/test/650.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/660.test.js b/.freeCodeCamp/test/660.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/670.test.js b/.freeCodeCamp/test/670.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/675.test.js b/.freeCodeCamp/test/675.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/680.test.js b/.freeCodeCamp/test/680.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/690.test.js b/.freeCodeCamp/test/690.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/692.test.js b/.freeCodeCamp/test/692.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/694.test.js b/.freeCodeCamp/test/694.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/696.test.js b/.freeCodeCamp/test/696.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/698.test.js b/.freeCodeCamp/test/698.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/70.test.js b/.freeCodeCamp/test/70.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/700.test.js b/.freeCodeCamp/test/700.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/710.test.js b/.freeCodeCamp/test/710.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/730.test.js b/.freeCodeCamp/test/730.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/740.test.js b/.freeCodeCamp/test/740.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/750.test.js b/.freeCodeCamp/test/750.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/760.test.js b/.freeCodeCamp/test/760.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/770.test.js b/.freeCodeCamp/test/770.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/780.test.js b/.freeCodeCamp/test/780.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/790.test.js b/.freeCodeCamp/test/790.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/80.test.js b/.freeCodeCamp/test/80.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/800.test.js b/.freeCodeCamp/test/800.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/810.test.js b/.freeCodeCamp/test/810.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/815.test.js b/.freeCodeCamp/test/815.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/817.test.js b/.freeCodeCamp/test/817.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/818.test.js b/.freeCodeCamp/test/818.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/819.test.js b/.freeCodeCamp/test/819.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/820.test.js b/.freeCodeCamp/test/820.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/822.test.js b/.freeCodeCamp/test/822.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/824.test.js b/.freeCodeCamp/test/824.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/826.test.js b/.freeCodeCamp/test/826.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/828.test.js b/.freeCodeCamp/test/828.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/830.test.js b/.freeCodeCamp/test/830.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/835.test.js b/.freeCodeCamp/test/835.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/840.test.js b/.freeCodeCamp/test/840.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/881.test.js b/.freeCodeCamp/test/881.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/884.test.js b/.freeCodeCamp/test/884.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/887.test.js b/.freeCodeCamp/test/887.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/890.test.js b/.freeCodeCamp/test/890.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/891.test.js b/.freeCodeCamp/test/891.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/893.test.js b/.freeCodeCamp/test/893.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/896.test.js b/.freeCodeCamp/test/896.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/897.test.js b/.freeCodeCamp/test/897.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/899.test.js b/.freeCodeCamp/test/899.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/90.test.js b/.freeCodeCamp/test/90.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/902.test.js b/.freeCodeCamp/test/902.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/905.test.js b/.freeCodeCamp/test/905.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/908.test.js b/.freeCodeCamp/test/908.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/911.test.js b/.freeCodeCamp/test/911.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/912.test.js b/.freeCodeCamp/test/912.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/913.test.js b/.freeCodeCamp/test/913.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/914.test.js b/.freeCodeCamp/test/914.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/916.test.js b/.freeCodeCamp/test/916.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/918.test.js b/.freeCodeCamp/test/918.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/920.test.js b/.freeCodeCamp/test/920.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/928.test.js b/.freeCodeCamp/test/928.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/930.test.js b/.freeCodeCamp/test/930.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/940.test.js b/.freeCodeCamp/test/940.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/945.test.js b/.freeCodeCamp/test/945.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/950.test.js b/.freeCodeCamp/test/950.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/960.test.js b/.freeCodeCamp/test/960.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/970.test.js b/.freeCodeCamp/test/970.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/980.test.js b/.freeCodeCamp/test/980.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/990.test.js b/.freeCodeCamp/test/990.test.js old mode 100644 new mode 100755 diff --git a/.freeCodeCamp/test/utils.js b/.freeCodeCamp/test/utils.js old mode 100644 new mode 100755 diff --git a/questionnaire.sh b/questionnaire.sh index 736955815d..7ccaeb9ad2 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,6 +1,6 @@ - #!/bin/bash QUESTION1="What's your name?" echo $QUESTION1 +read NAME From c5f0e63ad6136fac904f1a25afeabc764af095f7 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:32:06 -0600 Subject: [PATCH 41/86] 210.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 087d25d9b6..4606d370e6 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/200.test.js"], + "spec": ["./test/210.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 340bccd4e1..7ccaeb9ad2 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -3,3 +3,4 @@ QUESTION1="What's your name?" echo $QUESTION1 +read NAME From 21010a6e2e6062bb7c1524053a0915eb4dbf3975 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:03:20 +0000 Subject: [PATCH 42/86] Save progress: 210.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 5e791b3269..2b7b78b3da 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -13,3 +13,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 11c62afbce..4f9938e8ff 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -73,3 +73,4 @@ __vsc_dbg_trap="$(__vsc_get_trap DEBUG)" [[ "$__vsc_dbg_trap" != '__vsc_preexec "$_"' && "$__vsc_dbg_trap" != '__vsc_preexec_all "$_"' ]] trap '__vsc_preexec_all "$_"' DEBUG __vsc_original_prompt_command=${PROMPT_COMMAND:-} +__vsc_prompt_cmd_original diff --git a/questionnaire.sh b/questionnaire.sh index 7ccaeb9ad2..a584e217b4 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -4,3 +4,5 @@ QUESTION1="What's your name?" echo $QUESTION1 read NAME + +echo Hello $NAME. From 9ed64765b5afcc5b439d3e4475a04bec08bbae18 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:32:14 -0600 Subject: [PATCH 43/86] 220.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 4606d370e6..20cfea8a0a 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/210.test.js"], + "spec": ["./test/220.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 7ccaeb9ad2..a584e217b4 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -4,3 +4,5 @@ QUESTION1="What's your name?" echo $QUESTION1 read NAME + +echo Hello $NAME. From 03ef410b830edb85bd06bec6e85e7e3afbd06f33 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:03:42 +0000 Subject: [PATCH 44/86] Save progress: 220.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 2b7b78b3da..d86a12df8b 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -14,3 +14,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 4f9938e8ff..300fe74c15 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -74,3 +74,4 @@ __vsc_dbg_trap="$(__vsc_get_trap DEBUG)" trap '__vsc_preexec_all "$_"' DEBUG __vsc_original_prompt_command=${PROMPT_COMMAND:-} __vsc_prompt_cmd_original +./questionnaire.sh From b1b753b5bb8a5df5ed4acb1fc5c1f80d4c60d001 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:32:41 -0600 Subject: [PATCH 45/86] 230.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 20cfea8a0a..0e4c7f897a 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/220.test.js"], + "spec": ["./test/230.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 9e73fe4d99de61ed2bd442f0c104506b47d0b4e2 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:04:37 +0000 Subject: [PATCH 46/86] Save progress: 230.1 --- questionnaire.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/questionnaire.sh b/questionnaire.sh index a584e217b4..a2b70b67c9 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -6,3 +6,5 @@ echo $QUESTION1 read NAME echo Hello $NAME. + +QUESTION2="Where are you from?" From a99c7f9b656651d850cd27663702893277d5b916 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:33:04 -0600 Subject: [PATCH 47/86] 240.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 0e4c7f897a..f1d0db35da 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/230.test.js"], + "spec": ["./test/240.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index a584e217b4..2b4071c2cc 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,6 +1,7 @@ #!/bin/bash QUESTION1="What's your name?" +QUESTION2="Where are you from?" echo $QUESTION1 read NAME From 5a005ae45c7564d8a69e7630802d2b84c8469204 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:05:08 +0000 Subject: [PATCH 48/86] Save progress: 240.1 --- questionnaire.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/questionnaire.sh b/questionnaire.sh index a2b70b67c9..142089a231 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -8,3 +8,5 @@ read NAME echo Hello $NAME. QUESTION2="Where are you from?" + +echo $QUESTION2 From 647962f990e9368ff007557f788ed68e258390f4 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:33:25 -0600 Subject: [PATCH 49/86] 250.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index f1d0db35da..205a23e0d9 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/240.test.js"], + "spec": ["./test/250.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 2b4071c2cc..65b7a267ca 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -6,4 +6,6 @@ QUESTION2="Where are you from?" echo $QUESTION1 read NAME +echo $QUESTION2 + echo Hello $NAME. From 757cbd8b4c667ea2dc27993f36b303205d252c6d Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:06:12 +0000 Subject: [PATCH 50/86] Save progress: 250.1 --- questionnaire.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/questionnaire.sh b/questionnaire.sh index 142089a231..a9dcc6f0cd 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -10,3 +10,4 @@ echo Hello $NAME. QUESTION2="Where are you from?" echo $QUESTION2 +read LOCATION \ No newline at end of file From a6186bbfb23ccbaf473c5e09b6c6c772cba7e39c Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:34:27 -0600 Subject: [PATCH 51/86] 260.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 205a23e0d9..01f5eea0e6 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/250.test.js"], + "spec": ["./test/260.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 65b7a267ca..7a84ce1426 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -7,5 +7,6 @@ echo $QUESTION1 read NAME echo $QUESTION2 +read LOCATION echo Hello $NAME. From 87098423d12ca5d1263718774693d69d96aa92f8 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:07:02 +0000 Subject: [PATCH 52/86] Save progress: 260.1 --- questionnaire.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/questionnaire.sh b/questionnaire.sh index a9dcc6f0cd..4b756fc02b 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -10,4 +10,6 @@ echo Hello $NAME. QUESTION2="Where are you from?" echo $QUESTION2 -read LOCATION \ No newline at end of file +read LOCATION + +echo Hello $NAME from $LOCATION. From 6342fdb60409bd85dcba87ecd392aed0e51b9c34 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:34:40 -0600 Subject: [PATCH 53/86] 270.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 01f5eea0e6..885ed9eefc 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/260.test.js"], + "spec": ["./test/270.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 7a84ce1426..3ded91e778 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -9,4 +9,4 @@ read NAME echo $QUESTION2 read LOCATION -echo Hello $NAME. +echo Hello $NAME from $LOCATION. From 5eeac5b5e66b52fe4200fff51314a8a0f252bf32 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:07:35 +0000 Subject: [PATCH 54/86] Save progress: 270.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index d86a12df8b..b670a0f182 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -15,3 +15,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 300fe74c15..114dd5df06 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -75,3 +75,4 @@ trap '__vsc_preexec_all "$_"' DEBUG __vsc_original_prompt_command=${PROMPT_COMMAND:-} __vsc_prompt_cmd_original ./questionnaire.sh +./questionnaire.sh From f0231af22ca6c75f6900be5f43efb2db092ff1eb Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:34:59 -0600 Subject: [PATCH 55/86] 280.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 885ed9eefc..1b0b289d5b 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/270.test.js"], + "spec": ["./test/280.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 16a7854218280c24d53747edc5d6c8d0184476c5 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:09:17 +0000 Subject: [PATCH 56/86] Save progress: 280.1 --- questionnaire.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/questionnaire.sh b/questionnaire.sh index 4b756fc02b..8ab31e0783 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,5 +1,7 @@ #!/bin/bash +echo ~~ Questionnaire ~~ + QUESTION1="What's your name?" echo $QUESTION1 From 28897f38c89675f30a94e115306172f31b5453ad Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:35:25 -0600 Subject: [PATCH 57/86] 290.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 1b0b289d5b..85367df0d6 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/280.test.js"], + "spec": ["./test/290.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 3ded91e778..ce838b9961 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,5 +1,7 @@ #!/bin/bash +echo ~~ Questionnaire ~~ + QUESTION1="What's your name?" QUESTION2="Where are you from?" From 32d4e46b38992b9222413e372a31a3aa75f506a1 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:09:42 +0000 Subject: [PATCH 58/86] Save progress: 290.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index b670a0f182..51c70e9546 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -16,3 +16,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 114dd5df06..4cb3966886 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -76,3 +76,4 @@ __vsc_original_prompt_command=${PROMPT_COMMAND:-} __vsc_prompt_cmd_original ./questionnaire.sh ./questionnaire.sh +./questionnaire.sh From b18346eef40d5a5a15881cfe2afcef21a08905cb Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:36:16 -0600 Subject: [PATCH 59/86] 300.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 85367df0d6..d3075ec691 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/290.test.js"], + "spec": ["./test/300.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From a8c76a5a7267c158a8473c16cc29a89b71b524fa Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:09:59 +0000 Subject: [PATCH 60/86] Save progress: 300.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 51c70e9546..6f69b8d4e1 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -17,3 +17,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 4cb3966886..6293689ccf 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -77,3 +77,4 @@ __vsc_prompt_cmd_original ./questionnaire.sh ./questionnaire.sh ./questionnaire.sh +echo --help From 80ae275d9e6e1cda52cac23304cfd2c6fd43e5ea Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:37:00 -0600 Subject: [PATCH 61/86] 310.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index d3075ec691..8ea6d4f164 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/300.test.js"], + "spec": ["./test/310.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 1d0323206e22d4c92616c2cab9a3ad0e8e76599e Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:11:35 +0000 Subject: [PATCH 62/86] Save progress: 310.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 6f69b8d4e1..26c56488ec 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -18,3 +18,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 6293689ccf..039cf5d7a5 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -78,3 +78,4 @@ __vsc_prompt_cmd_original ./questionnaire.sh ./questionnaire.sh echo --help +man echo From f50e9280d2a525d58d1f4ebe847d378d2aa41316 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:37:26 -0600 Subject: [PATCH 63/86] 320.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 8ea6d4f164..5be43da2d3 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/310.test.js"], + "spec": ["./test/320.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 3761e0709e34d8fc8f37adad1a1d1f9806d66ca5 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:13:25 +0000 Subject: [PATCH 64/86] Save progress: 320.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 26c56488ec..96cf86525d 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -19,3 +19,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 039cf5d7a5..c7759b56db 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -79,3 +79,4 @@ __vsc_prompt_cmd_original ./questionnaire.sh echo --help man echo +echo -e \n~~ Questionnaire ~~\n diff --git a/questionnaire.sh b/questionnaire.sh index 8ab31e0783..5fba3b2fec 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo ~~ Questionnaire ~~ +echo -e \n~~ Questionnaire ~~\n QUESTION1="What's your name?" From 470d3055589c69439e2769a2cc2ae28fe597d541 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 10 Mar 2021 13:45:03 -0600 Subject: [PATCH 65/86] 323.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 5be43da2d3..8714600b2c 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/320.test.js"], + "spec": ["./test/323.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index ce838b9961..539d1d1f65 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo ~~ Questionnaire ~~ +echo -e \n~~ Questionnaire ~~\n QUESTION1="What's your name?" QUESTION2="Where are you from?" From bd161885dae5152513652dc92966801613192972 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:13:51 +0000 Subject: [PATCH 66/86] Save progress: 323.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 96cf86525d..8087d576db 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -20,3 +20,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index c7759b56db..d01f3aef69 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -80,3 +80,4 @@ __vsc_prompt_cmd_original echo --help man echo echo -e \n~~ Questionnaire ~~\n +./questionnaire.sh From 76e0edce639310e6e8254d793037893b75f725dd Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 10 Mar 2021 13:45:37 -0600 Subject: [PATCH 67/86] 326.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 8714600b2c..da033dca41 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/323.test.js"], + "spec": ["./test/326.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From acdec1f0f84b48fbddd6194bcda32c4f5dd793fa Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:14:05 +0000 Subject: [PATCH 68/86] added test file --- .freeCodeCamp/test.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .freeCodeCamp/test.sh diff --git a/.freeCodeCamp/test.sh b/.freeCodeCamp/test.sh new file mode 100755 index 0000000000..1eb4b27ae5 --- /dev/null +++ b/.freeCodeCamp/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +QUESTION1="What's your name?" + +echo $QUESTION1 +read NAME + +echo Hello $NAME. + +QUESTION2="Where are you from?" + +echo $QUESTION2 +read LOCATION +echo $LOCATION \ No newline at end of file From 77b7f731982c2450c89437863e5a4fd7bad49463 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:14:33 +0000 Subject: [PATCH 69/86] Save progress: 326.1 --- questionnaire.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/questionnaire.sh b/questionnaire.sh index 5fba3b2fec..4234d2718e 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo -e \n~~ Questionnaire ~~\n +echo -e "\n~~ Questionnaire ~~\n" QUESTION1="What's your name?" From 2b830da74d56a1198104321217982a5fdf5c2a67 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:37:45 -0600 Subject: [PATCH 70/86] 330.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index da033dca41..66ef490820 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/326.test.js"], + "spec": ["./test/330.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 539d1d1f65..6dbf9845df 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo -e \n~~ Questionnaire ~~\n +echo -e "\n~~ Questionnaire ~~\n" QUESTION1="What's your name?" QUESTION2="Where are you from?" From fa03796cce8e1c9bf87ec753f33a88ad0aaf8907 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:15:17 +0000 Subject: [PATCH 71/86] Save progress: 330.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + 2 files changed, 2 insertions(+) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 8087d576db..459c3d794a 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -21,3 +21,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index d01f3aef69..0fb4014d70 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -81,3 +81,4 @@ echo --help man echo echo -e \n~~ Questionnaire ~~\n ./questionnaire.sh +./questionnaire.sh From 93fd12f8313e09ca03eb74a1afd811b0291a99ae Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:38:44 -0600 Subject: [PATCH 72/86] 340.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 66ef490820..b82575ec2c 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/330.test.js"], + "spec": ["./test/340.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From 4826f560b2f9883b4010f3ee60854ec82660ee24 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:15:53 +0000 Subject: [PATCH 73/86] Save progress: 340.1 --- .freeCodeCamp/test.sh | 8 +++++++- questionnaire.sh | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/test.sh b/.freeCodeCamp/test.sh index 1eb4b27ae5..8b71e8fb19 100755 --- a/.freeCodeCamp/test.sh +++ b/.freeCodeCamp/test.sh @@ -1,5 +1,7 @@ #!/bin/bash +echo -e "\n~~ Questionnaire ~~\n" + QUESTION1="What's your name?" echo $QUESTION1 @@ -11,4 +13,8 @@ QUESTION2="Where are you from?" echo $QUESTION2 read LOCATION -echo $LOCATION \ No newline at end of file + +echo Hello $NAME from $LOCATION. + +QUESTION3="What's your favorite coding website?" +echo $QUESTION3 \ No newline at end of file diff --git a/questionnaire.sh b/questionnaire.sh index 4234d2718e..fb0231c1c2 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -15,3 +15,5 @@ echo $QUESTION2 read LOCATION echo Hello $NAME from $LOCATION. + +QUESTION3="What's your favorite coding website?" \ No newline at end of file From af243f45e0e37ec2725216f4ad03cf5d85879e58 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 10 Mar 2021 13:48:51 -0600 Subject: [PATCH 74/86] 345.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index b82575ec2c..f284211e7a 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/340.test.js"], + "spec": ["./test/345.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 6dbf9845df..9d4990efe7 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -4,6 +4,7 @@ echo -e "\n~~ Questionnaire ~~\n" QUESTION1="What's your name?" QUESTION2="Where are you from?" +QUESTION3="What's your favorite coding website?" echo $QUESTION1 read NAME From f689af4beb29bb02cfc230ceacb7012e418c0c5c Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:16:27 +0000 Subject: [PATCH 75/86] Save progress: 345.1 --- questionnaire.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/questionnaire.sh b/questionnaire.sh index fb0231c1c2..9bdbf9145d 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -16,4 +16,6 @@ read LOCATION echo Hello $NAME from $LOCATION. -QUESTION3="What's your favorite coding website?" \ No newline at end of file +QUESTION3="What's your favorite coding website?" + +echo $QUESTION3 \ No newline at end of file From 1eaf9fcf0b00d2c9e7e413dc2fbcb530132451f6 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:39:03 -0600 Subject: [PATCH 76/86] 350.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index f284211e7a..d2515b36f0 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/345.test.js"], + "spec": ["./test/350.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 9d4990efe7..81211b909e 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -12,4 +12,6 @@ read NAME echo $QUESTION2 read LOCATION +echo $QUESTION3 + echo Hello $NAME from $LOCATION. From be72b62c0ab12aaf60cc91825b03bf757e1bb96b Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:17:15 +0000 Subject: [PATCH 77/86] Save progress: 350.1 --- .freeCodeCamp/test.sh | 6 +++++- questionnaire.sh | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/test.sh b/.freeCodeCamp/test.sh index 8b71e8fb19..8b903e1d2c 100755 --- a/.freeCodeCamp/test.sh +++ b/.freeCodeCamp/test.sh @@ -17,4 +17,8 @@ read LOCATION echo Hello $NAME from $LOCATION. QUESTION3="What's your favorite coding website?" -echo $QUESTION3 \ No newline at end of file + +echo $QUESTION3 + +read WEBSITE +echo $WEBSITE \ No newline at end of file diff --git a/questionnaire.sh b/questionnaire.sh index 9bdbf9145d..1558d42f98 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -18,4 +18,6 @@ echo Hello $NAME from $LOCATION. QUESTION3="What's your favorite coding website?" -echo $QUESTION3 \ No newline at end of file +echo $QUESTION3 + +read WEBSITE \ No newline at end of file From c42663ff8e6b66c2110772b93d608273bfef189e Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:39:31 -0600 Subject: [PATCH 78/86] 360.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index d2515b36f0..c845ae2144 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/350.test.js"], + "spec": ["./test/360.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index 81211b909e..fe072ae137 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -13,5 +13,6 @@ echo $QUESTION2 read LOCATION echo $QUESTION3 +read WEBSITE echo Hello $NAME from $LOCATION. From 50043255ac8695c03fd26b4e7fb28ad78aca972f Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:20:27 +0000 Subject: [PATCH 79/86] Save progress: 360.1 --- questionnaire.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/questionnaire.sh b/questionnaire.sh index 1558d42f98..14fd68496f 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -20,4 +20,6 @@ QUESTION3="What's your favorite coding website?" echo $QUESTION3 -read WEBSITE \ No newline at end of file +read WEBSITE + +echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! \ No newline at end of file From 991ce73258f6d18cc219bd13b8a4f53050470203 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 10 Mar 2021 13:50:11 -0600 Subject: [PATCH 80/86] 363.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index c845ae2144..dc81c80e5d 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/360.test.js"], + "spec": ["./test/363.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index fe072ae137..da8fdea286 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -15,4 +15,4 @@ read LOCATION echo $QUESTION3 read WEBSITE -echo Hello $NAME from $LOCATION. +echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! From 354bce57722a7cd794f3d961fc987deeeae7e412 Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:21:23 +0000 Subject: [PATCH 81/86] Save progress: 363.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 459c3d794a..7544078509 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -22,3 +22,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 0fb4014d70..1274a9b33c 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -82,3 +82,4 @@ man echo echo -e \n~~ Questionnaire ~~\n ./questionnaire.sh ./questionnaire.sh +./questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh index 14fd68496f..8de807173e 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -22,4 +22,5 @@ echo $QUESTION3 read WEBSITE -echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! \ No newline at end of file +echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! + From 43ddff2fbc832817de4fe749d1f842987885090b Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Wed, 10 Mar 2021 13:51:15 -0600 Subject: [PATCH 82/86] 366.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index dc81c80e5d..34f02b4b46 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/363.test.js"], + "spec": ["./test/366.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", From f39087b3774f30213a30d25e374cb25a8d39821c Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:25:10 +0000 Subject: [PATCH 83/86] Save progress: 366.1 --- questionnaire.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/questionnaire.sh b/questionnaire.sh index 8de807173e..ae70a54f18 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -22,5 +22,6 @@ echo $QUESTION3 read WEBSITE +echo echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! From 00d6cff09bd837879371c25599d7f193aaaaa8bc Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:39:44 -0600 Subject: [PATCH 84/86] 370.1 --- .freeCodeCamp/.mocharc.json | 2 +- .freeCodeCamp/reset_files/questionnaire.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index 34f02b4b46..eb1d44a5ec 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/366.test.js"], + "spec": ["./test/370.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000", diff --git a/.freeCodeCamp/reset_files/questionnaire.sh b/.freeCodeCamp/reset_files/questionnaire.sh index da8fdea286..f815b8ce05 100755 --- a/.freeCodeCamp/reset_files/questionnaire.sh +++ b/.freeCodeCamp/reset_files/questionnaire.sh @@ -15,4 +15,4 @@ read LOCATION echo $QUESTION3 read WEBSITE -echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! +echo -e "\nHello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE!" From 27a18eec7f161f23fcac3fbe9fd4f16eb07a482d Mon Sep 17 00:00:00 2001 From: Soham Kumar Modi Date: Sun, 18 Aug 2024 17:26:38 +0000 Subject: [PATCH 85/86] Save progress: 370.1 --- .freeCodeCamp/test/.cwd | 1 + .freeCodeCamp/test/.next_command | 1 + questionnaire.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.freeCodeCamp/test/.cwd b/.freeCodeCamp/test/.cwd index 7544078509..80546422b4 100755 --- a/.freeCodeCamp/test/.cwd +++ b/.freeCodeCamp/test/.cwd @@ -23,3 +23,4 @@ /workspace/project /workspace/project /workspace/project +/workspace/project diff --git a/.freeCodeCamp/test/.next_command b/.freeCodeCamp/test/.next_command index 1274a9b33c..b00335d172 100755 --- a/.freeCodeCamp/test/.next_command +++ b/.freeCodeCamp/test/.next_command @@ -83,3 +83,4 @@ echo -e \n~~ Questionnaire ~~\n ./questionnaire.sh ./questionnaire.sh ./questionnaire.sh +./questionnaire.sh diff --git a/questionnaire.sh b/questionnaire.sh index ae70a54f18..3c9a3260a8 100755 --- a/questionnaire.sh +++ b/questionnaire.sh @@ -22,6 +22,6 @@ echo $QUESTION3 read WEBSITE -echo +echo -e "\n" echo Hello $NAME from $LOCATION. I learned that your favorite coding website is $WEBSITE! From 9cb20a473592137e91be9dd3c8da5b8292028c32 Mon Sep 17 00:00:00 2001 From: moT01 <20648924+moT01@users.noreply.github.com> Date: Thu, 4 Mar 2021 19:40:23 -0600 Subject: [PATCH 86/86] 380.1 --- .freeCodeCamp/.mocharc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.freeCodeCamp/.mocharc.json b/.freeCodeCamp/.mocharc.json index eb1d44a5ec..bd0cb192f3 100755 --- a/.freeCodeCamp/.mocharc.json +++ b/.freeCodeCamp/.mocharc.json @@ -1,5 +1,5 @@ { - "spec": ["./test/370.test.js"], + "spec": ["./test/380.test.js"], "reporter": "mocha-tap-reporter", "fail-zero": false, "timeout": "5000",