You are working on an Angular project and you need to scaffold a base skeleton.
Write a script scaffold.sh that creates the following filesystem structure. It should take one command line argument, which can be local or prod. Accordingly, it should choose which environment the symlink points to.
If $1 is given as prod, your script should scaffold this:
src/
├── app/
│ └── index.html
└── environments/
├── environment.local.ts
├── environment.prod.ts
└── environment.ts -> environment.prod.ts
If $1 is given as local, your script should scaffold this instead:
src/
├── app/
│ └── index.html
└── environments/
├── environment.local.ts
├── environment.prod.ts
└── environment.ts -> environment.local.ts
scaffold.sh. It will be given the command line argument prod or local and should use it to create the symlink.The test lists what your script created, with -> after each symlink.
You are working on an Angular project and you need to scaffold a base skeleton. Write a script `scaffold.sh` that creates the following filesystem structure. It should take one command line argument, which can be `local` or `prod`. Accordingly, it should choose which environment the symlink points to. If `$1` is given as `prod`, your script should scaffold this: ```text src/ ├── app/ │ └── index.html └── environments/ ├── environment.local.ts ├── environment.prod.ts └── environment.ts -> environment.prod.ts ``` If `$1` is given as `local`, your script should scaffold this instead: ```text src/ ├── app/ │ └── index.html └── environments/ ├── environment.local.ts ├── environment.prod.ts └── environment.ts -> environment.local.ts ``` ## Instructions - Write your script in `scaffold.sh`. It will be given the command line argument `prod` or `local` and should use it to create the symlink. - It should create the files and folders in the current directory. - Files can be empty files. - If the link is not correctly created, the test fails and no marks are given. ## Hints - Symlinks store the path relative to the link itself. The test lists what your script created, with `->` after each symlink. Given two positive integers, interleave their digits to form and print a new number. The digits of the two input numbers should be taken from left to right, one digit at a time. Start with the first digit of the first number, then take the first digit of the second number, followed by the second digit of the first number, then the second digit of the second number, and so on. If one number has fewer digits than the other, continue adding the remaining digits of the longer number in their original order after all digits of the shorter number have been used. ## Instructions - Write your script in `script.sh`. - Read the numbers from standard input, one per line. - Print the new number to standard output. ## Sample Input ```text 1234 5678 ``` ## Sample Output ```text 15263748 ``` ## Sample Input ```text 11111111 222 ``` ## Sample Output ```text 12121211111 ``` ## Constraints - The numbers will always be positive and entered without a leading sign. - The numbers will not have any fractional values. - The two numbers may be of different lengths. - If the two numbers have different lengths, continue the rest of the longer number in the output. Given a number, find its sum of digits. ## Instructions - Write your script in `script.sh`. - The script should read the number from standard input. - The script should output the sum to standard output. ## Sample Input 1 ```text 101 ``` ## Sample Output 1 ```text 2 ``` ## Sample Input 2 ```text 222 ``` ## Sample Output 2 ```text 6 ``` ## Constraints - The number can be any number of digits. - The number will be positive and have no leading sign. - The number will be whole and contain no decimal points.