Question: Write C bash automation script move_files.csh on the basis of following conditions: There are around 1000 files with extension like *.efg, *.vpf, *.ept, *.xml, *.pdf,
Write C bash automation script move_files.csh on the basis of following conditions:
- There are around 1000 files with extension like *.efg, *.vpf, *.ept, *.xml, *.pdf, *.log, *.v, *.sv, *.as, *.os, f*.vt, z*.vt, f*.v, z*.sv, *.lib, *.mt, *.txt, *.area, *.density, *.cube, *.max, *.min, f*.cor, z*.cor, f*.inc, z*.inc, *.va, *.sh, *.csh, *.pl, *.py, *.gr, *.def.
- You can consider any number of file of a specific extension but they are all in parent and subfolders.
- Source Parent Folder and subfolders are organized like below:
- PQRST (PQRST has 4 subfolders)
- PQR (PQR has 3 subfolders)
- PQ (PQ has 2 subfolders)
- P
- Q
- QR
- RP (RP has 2 sub folders)
- R
- P
- PQ (PQ has 2 subfolders)
- QRS/QR/RS/SQ
- RST
- RS/R/S
- ST/
- S
- T
- STP/
- ST
- TP/S/T/P
- PQR (PQR has 3 subfolders)
- PQRST (PQRST has 4 subfolders)
- Destination Parent Folder and subfolders are organized as below:
- UVWXYZ (UVWXYZ has 5 sub folders)
- UVWX
- UV
- WX
- VWXY
- VWX/VW/WX/XV
- WXY
- WXYZ
- XYZ/Z
- WXY
- XYZU
- YZUV
- ZUV/ZU/U/V
- YZU/ZU/Y/U
- UVWX
- UVWXYZ (UVWXYZ has 5 sub folders)
- Conditions:
- Folder UVWX will contain files like *.efg, *.vpf, *.ept, *.xml, *.pdf, *.log, *.v, *.sv, *.as, *.os, f*.vt, z*.vt, f*.v, z*.sv, *.mt, *.txt.
- UV contains file *.log, *.v, *.sv, *.as, *.os, f*.vt, z*.vt, f*.v, z*.sv.
- WX contains file like *.efg, *.vpf, *.ept, *.xml, *.pdf, *.log, *.mt, *.txt.
- Folder VWXY contains file like *.area, *.density, *.cube, *.max, *.min, f*.cor, z*.cor, f*.inc, z*.inc.
- XYZ/Z contains file *.area, *.density, *.cube, *.max, *.min.
- WXY contains file f*.cor, z*.cor, f*.inc, z*.inc.
- Folder XYZU contains files like *.lib.
- Folder YZUV contains file like *.va, *.sh, *.csh, *.pl, *.py, *.gr, *.de
- ZUV/ZU/U/V contains files *.va, *.sh, *.csh, *.pl. Files can be in same folder or different folder. It is your choice.
- YZU/ZU/Y/U contains file *.py, *.gr, *.def. Files can be in same folder or different folder. It is your choice.
- Scripts should contain if needs
- Variables
- Conditional and loops statements like if, else, elif
- Commands like cp, cd, mkdir, rm, mv, awk, grep, set, unset, setenv if need. Use options with these commands



z* a. Write C bash automation script move files.csh on the basis of following conditions: 1. There are around 1000 files with extension like *.efg, *.vpf, *.ept, *.xml, *.pdf, *.log, *as, *.os, f*.vt, z*.vt, f*.v, z*.sv, *.lib, *.mt, *.txt, *.area, * density, *.cube, *.max, *.min, f*.cor, *.cor, f*.inc, z*.inc, *va, csh, *.pl, *.py, *.gr, * def. 2. You can consider any number of file of a specific extension but they are all in parent and subfolders. 3. Source Parent Folder and subfolders are organized like below: a. PQRST (PQRST has 4 subfolders) i. POR (PQR has 3 subfolders) 1. PQ (PQ has 2 subfolders) P b. Q 2. QR 3. (RP has 2 sub folders) R b.pl ii. QRS/QR/RS/SQ iii. RST 1. RS/R/S 2. ST/ S b. T iv. STP/ 1. ST 2. TP/S/T/P RP a. a. 4. Destination Parent Folder and subfolders are organized as below: a. UVWXYZ (UVWXYZ has 5 sub folders) i. Uvwx 1. UV 2. WX ii. VWXY 1. VwX/VW/WX/XV 2. WXY iii. WXYZ 1. XYZ/Z 2. WXY iv. XYZU V. YZUV 1. ZUV/ZU/U/V 2. YZU/ZU/Y/U 5. Conditions: a. Folder UVWX will contain files like * efg, *vpf, .ept, *.xml, *.pdf, *.log, os, f*.vt, z*.vt, f*.v, z*.sv, *.mt, *.txt. b. UV contains file *.log, f*.vt, z*.vt, f*.v, z*.sv, WX contains file like * efg, * vrf, *ept, *.xml, *.pdf, *.log, *.mt, *.txt. d. Folder VWXY contains file like *.area, * density, *.cube, *.max, *.min, f*.cor, f*.inc, z*.inc. i. XYZ/Z contains file * area, * density, * cube, *.max, *.min. * .as, * SV w .as, os, W * c. z*.cor ii. WXY contains file f*.cor, z*.cor, f*.inc, z*.inc. e. Folder XYZU contains files like *.lib. f. Folder YZUV contains file like *.va, .csh, *.pl, *.py, *.gr, *.def. i. ZUV/ZU/U/V contains files csh, *.pl. Files can be in same folder or different folder. It is your choice. ii. YZU/ZU/Y/U contains file * px, *gr, * def. Files can be in same folder or different folder. It is your choice. 6. Scripts should contain if needs a. Variables b. Conditional and loops statements like if, else, elif Commands like cp, cd, mkdir, rm, mv, awk, grep, set, unset, setenv if need. Use options with these commands c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
