You are working on a C project and need to scaffold a base project skeleton.
Write a script scaffold.sh that creates the following filesystem structure:
include/
└── my_project/
└── config.h
src/
├── main.c
└── config/
├── config.debug.h
├── config.release.h
└── config.h -> config.release.h
tests/
The script should take one command-line argument, which can be either debug or release. Depending on the argument, the config.h symbolic link should point to the corresponding configuration file:
debug → config.debug.hrelease → config.release.hFor example, ./scaffold.sh debug should result in src/config/config.h -> config.debug.h, and ./scaffold.sh release should result in src/config/config.h -> config.release.h.
The script should create all required directories and files.
scaffold.sh. It will be given the command line argument debug or release and should use it to create the symlink.The test lists what your script created, with -> after each symlink.
You are working on a C project and need to scaffold a base project skeleton. Write a script `scaffold.sh` that creates the following filesystem structure: ```text include/ └── my_project/ └── config.h src/ ├── main.c └── config/ ├── config.debug.h ├── config.release.h └── config.h -> config.release.h tests/ ``` The script should take one command-line argument, which can be either `debug` or `release`. Depending on the argument, the `config.h` symbolic link should point to the corresponding configuration file: - `debug` → `config.debug.h` - `release` → `config.release.h` For example, `./scaffold.sh debug` should result in `src/config/config.h -> config.debug.h`, and `./scaffold.sh release` should result in `src/config/config.h -> config.release.h`. The script should create all required directories and files. ## Instructions - Write your script in `scaffold.sh`. It will be given the command line argument `debug` or `release` 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. There are no partial marks. ## Hints - Symlinks store the path relative to the link itself. The test lists what your script created, with `->` after each symlink. ## Definition An automorphic number is a number whose square ends in the same digits as the number itself. A number `n` is called automorphic if `n² (mod 10^d) = n` where `d` is the number of digits in `n`. ## Problem Statement Given a number as input, print whether it is automorphic or not. ## Output Format - `1` if the number is automorphic - `0` if the number is not automorphic ## Instructions - Write your script in `script.sh`. - Read the number from standard input. - Print the output to standard output. ## Sample Input ```text 25 ``` ## Sample Output ```text 1 ``` ## Sample Input ```text 26 ``` ## Sample Output ```text 0 ``` ## Constraints - The number will always be positive and entered without a leading sign. - The number will not have any fractional values. - The number may be of any length within bash limits. - We are considering base 10 here. Given a line of text as input, find the longest word whose characters are all distinct. A word consists only of alphabetic characters (a-z). Words are separated by spaces. If multiple words have the same maximum length, print the first one. ## Instructions - Create your solution in `script.sh`. - It should read input from standard input. - It should output (if any) to standard output. ## Sample Input ```text perhaps one did not want to be loved so much as to be understood ``` ## Sample Output ```text loved ``` ## Sample Input ```text if you want to keep a secret you must also hide it from yourself ``` ## Sample Output ```text yourself ``` ## Constraints - The input contains at least one word. - Words contain only English letters. - There may be multiple spaces between words. - The input can be arbitrarily long. - The words are all in lowercase. - The line contains only words and spaces. - If no words have unique characters, print nothing.