This script analyzes directory structures and generates arrays or commands to recreate the structure including permissions and ownership. It uses the find command to retrieve directory information, then processes the output to extract attributes like owner, group, and permissions. It can generate shell code defining arrays of the attributes, or commands to recreate the directories and set permissions. The script works in KornShell, ZShell or Bash.
A key feature of TYPO3 today is its extendability and flexibility. Writing extensions was never easier since the Kickstarter, and tslib_piBase. But, time doesn't stand still: new programming paradigms other innovative frameworks came up. It's time to take a next step to faster, cleaner extension coding. With the new Version 5 of TYPO3 and its basis FLOW3 the way to develop extensions will change fundamentally. With Extbase - the new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of the framework to understand how it supports your development process. We also address the users perspective by discussing best practices how to migrate to TYPO3 v5.
[PL] Jak nie zostać "programistą" PHP?Radek Benkel
Po sieci krąży wiele opinii, jak to programiści PHP nie są prawdziwymi programistami i że PHP to w ogóle nie jest język programowania, etc.
A winni takiego stanu rzeczy są sami programiści bądź właśnie „programiści”. Dlaczego? W każdym języku da się napisać kod zły jak i dobry. A w świecie PHP niestety dużo jest tego złego – choć trend ten zmienia się na lepsze.
Celem wykładu jest zapoznanie uczestników z rzeczami, na które należy zwrócić uwagę podczas tworzenia aplikacji w języku PHP. Druga (krótsza) część prezentacji będzie poświęcona ogólnym dobrym praktykom programistycznym, nie związanym z żadnym konkretnym językiem.
A key feature of TYPO3 today is its extendability and flexibility. Writing extensions was never easier since the Kickstarter, and tslib_piBase. But, time doesn't stand still: new programming paradigms other innovative frameworks came up. It's time to take a next step to faster, cleaner extension coding. With the new Version 5 of TYPO3 and its basis FLOW3 the way to develop extensions will change fundamentally. With Extbase - the new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of the framework to understand how it supports your development process. We also address the users perspective by discussing best practices how to migrate to TYPO3 v5.
[PL] Jak nie zostać "programistą" PHP?Radek Benkel
Po sieci krąży wiele opinii, jak to programiści PHP nie są prawdziwymi programistami i że PHP to w ogóle nie jest język programowania, etc.
A winni takiego stanu rzeczy są sami programiści bądź właśnie „programiści”. Dlaczego? W każdym języku da się napisać kod zły jak i dobry. A w świecie PHP niestety dużo jest tego złego – choć trend ten zmienia się na lepsze.
Celem wykładu jest zapoznanie uczestników z rzeczami, na które należy zwrócić uwagę podczas tworzenia aplikacji w języku PHP. Druga (krótsza) część prezentacji będzie poświęcona ogólnym dobrym praktykom programistycznym, nie związanym z żadnym konkretnym językiem.
Web Typography is exploding all over the web, we made a jQuery plugin to give you control over those new fonts. We also made this powerpoint for a talk on the same subject.
Have you heard WP-CLI, an about open source WordPress management tool that can make your development flow a lot easier? If you’ve heard about it or already use, you probably wondered how it it be extended to support custom commands. This talk will give you a short overview how to accomplish this and make your own magic with WP-CLI.
Simple Ways To Be A Better Programmer (OSCON 2007)Michael Schwern
"Simple Ways To Be A Better Programmer' as presented at OSCON 2007 by Michael G Schwern.
The audio is still out of sync, working on it. Downloading will be available once the sync is done.
One of the most time consuming tasks as a red teamer is diving into filesystems and shares, attempting to identify any potentially sensitive information. Genneraly users store credentials and other sensitive information in local filesystems and this talk has the purpose of explaining how to use the carnivorall as a means to speed up the task of searching important files using several vectors. I will present some proof of concepts, comparisons between tools and my recent success cases in red teaming engagements."
Web Typography is exploding all over the web, we made a jQuery plugin to give you control over those new fonts. We also made this powerpoint for a talk on the same subject.
Have you heard WP-CLI, an about open source WordPress management tool that can make your development flow a lot easier? If you’ve heard about it or already use, you probably wondered how it it be extended to support custom commands. This talk will give you a short overview how to accomplish this and make your own magic with WP-CLI.
Simple Ways To Be A Better Programmer (OSCON 2007)Michael Schwern
"Simple Ways To Be A Better Programmer' as presented at OSCON 2007 by Michael G Schwern.
The audio is still out of sync, working on it. Downloading will be available once the sync is done.
One of the most time consuming tasks as a red teamer is diving into filesystems and shares, attempting to identify any potentially sensitive information. Genneraly users store credentials and other sensitive information in local filesystems and this talk has the purpose of explaining how to use the carnivorall as a means to speed up the task of searching important files using several vectors. I will present some proof of concepts, comparisons between tools and my recent success cases in red teaming engagements."
Desde que empecé con Linux hace años, la consola, los scripts y yo nos hemos ido conociendo poco a poco hasta que ha surgido una bonita amistad. Hoy, en cuanto me surge la oportunidad juego con ellos para automatizar casi cualquier cosa de mi sistema operativo.
En esta charla quiero enseñar a programar scripts de Bash desde cero e ir subiendo la complejidad para terminar con AWK.
Originalmente es un taller que presenté en el t3chfest y que tuvo muy buena acogida, y que para el CommitConf he reducido y reestructurado como charla para que los que vengáis aprendáis los conceptos básicos de Bash y de AWK.
Postman is a tool for designing, sharing and testing APIs between a group of collaborators that range from the API developers down to the final clients, be them mobile apps or web apps.
This presentation focuses on using Postman's advanced free features, with a special focus on testing.
I have linked an example collection which I refer to several times during the presentation.
Section 1 - Fundamentals
Environments, variables, collections, and workspaces
Roles, VCS
Section 2 - Scripts & Testing
Pre request scripts and tests
Scopes
Pass data between requests
Section 3 - Integrated testing
Collection runners: read data from files, workflows
Monitors
CD/CI integration with Newman
Section 4 - More!
Documentation
Mock server
Integrations
Word Play in the Digital Age: Building Text Bots with TracerySarah Sexton
Life is filled with moments of unexpected laughter. In this technical talk, walk through how to create your own comedy with an exciting mad-lib style JavaScript tool: Tracery! Kate Compton’s templating language, free and open source, is a multipurpose text-expansion library. It can be used to generate text for your NPC dialog, gameplay collectibles, twitterbots, chat bots, and more! Learn how to take a piece of text with #tags# in it, replace the text between the two hashtags with a replacement rule, and fill in the blanks with unpredictable diction. Come find out what bizarre stories you can write in a way that is easy and fun to program.
Knee anatomy and clinical tests 2024.pdfvimalpl1234
This includes all relevant anatomy and clinical tests compiled from standard textbooks, Campbell,netter etc..It is comprehensive and best suited for orthopaedicians and orthopaedic residents.
- Video recording of this lecture in English language: https://youtu.be/kqbnxVAZs-0
- Video recording of this lecture in Arabic language: https://youtu.be/SINlygW1Mpc
- Link to download the book free: https://nephrotube.blogspot.com/p/nephrotube-nephrology-books.html
- Link to NephroTube website: www.NephroTube.com
- Link to NephroTube social media accounts: https://nephrotube.blogspot.com/p/join-nephrotube-on-social-media.html
These simplified slides by Dr. Sidra Arshad present an overview of the non-respiratory functions of the respiratory tract.
Learning objectives:
1. Enlist the non-respiratory functions of the respiratory tract
2. Briefly explain how these functions are carried out
3. Discuss the significance of dead space
4. Differentiate between minute ventilation and alveolar ventilation
5. Describe the cough and sneeze reflexes
Study Resources:
1. Chapter 39, Guyton and Hall Textbook of Medical Physiology, 14th edition
2. Chapter 34, Ganong’s Review of Medical Physiology, 26th edition
3. Chapter 17, Human Physiology by Lauralee Sherwood, 9th edition
4. Non-respiratory functions of the lungs https://academic.oup.com/bjaed/article/13/3/98/278874
Basavarajeeyam is a Sreshta Sangraha grantha (Compiled book ), written by Neelkanta kotturu Basavaraja Virachita. It contains 25 Prakaranas, First 24 Chapters related to Rogas& 25th to Rasadravyas.
Flu Vaccine Alert in Bangalore Karnatakaaddon Scans
As flu season approaches, health officials in Bangalore, Karnataka, are urging residents to get their flu vaccinations. The seasonal flu, while common, can lead to severe health complications, particularly for vulnerable populations such as young children, the elderly, and those with underlying health conditions.
Dr. Vidisha Kumari, a leading epidemiologist in Bangalore, emphasizes the importance of getting vaccinated. "The flu vaccine is our best defense against the influenza virus. It not only protects individuals but also helps prevent the spread of the virus in our communities," he says.
This year, the flu season is expected to coincide with a potential increase in other respiratory illnesses. The Karnataka Health Department has launched an awareness campaign highlighting the significance of flu vaccinations. They have set up multiple vaccination centers across Bangalore, making it convenient for residents to receive their shots.
To encourage widespread vaccination, the government is also collaborating with local schools, workplaces, and community centers to facilitate vaccination drives. Special attention is being given to ensuring that the vaccine is accessible to all, including marginalized communities who may have limited access to healthcare.
Residents are reminded that the flu vaccine is safe and effective. Common side effects are mild and may include soreness at the injection site, mild fever, or muscle aches. These side effects are generally short-lived and far less severe than the flu itself.
Healthcare providers are also stressing the importance of continuing COVID-19 precautions. Wearing masks, practicing good hand hygiene, and maintaining social distancing are still crucial, especially in crowded places.
Protect yourself and your loved ones by getting vaccinated. Together, we can help keep Bangalore healthy and safe this flu season. For more information on vaccination centers and schedules, residents can visit the Karnataka Health Department’s official website or follow their social media pages.
Stay informed, stay safe, and get your flu shot today!
Tom Selleck Health: A Comprehensive Look at the Iconic Actor’s Wellness Journeygreendigital
Tom Selleck, an enduring figure in Hollywood. has captivated audiences for decades with his rugged charm, iconic moustache. and memorable roles in television and film. From his breakout role as Thomas Magnum in Magnum P.I. to his current portrayal of Frank Reagan in Blue Bloods. Selleck's career has spanned over 50 years. But beyond his professional achievements. fans have often been curious about Tom Selleck Health. especially as he has aged in the public eye.
Follow us on: Pinterest
Introduction
Many have been interested in Tom Selleck health. not only because of his enduring presence on screen but also because of the challenges. and lifestyle choices he has faced and made over the years. This article delves into the various aspects of Tom Selleck health. exploring his fitness regimen, diet, mental health. and the challenges he has encountered as he ages. We'll look at how he maintains his well-being. the health issues he has faced, and his approach to ageing .
Early Life and Career
Childhood and Athletic Beginnings
Tom Selleck was born on January 29, 1945, in Detroit, Michigan, and grew up in Sherman Oaks, California. From an early age, he was involved in sports, particularly basketball. which played a significant role in his physical development. His athletic pursuits continued into college. where he attended the University of Southern California (USC) on a basketball scholarship. This early involvement in sports laid a strong foundation for his physical health and disciplined lifestyle.
Transition to Acting
Selleck's transition from an athlete to an actor came with its physical demands. His first significant role in "Magnum P.I." required him to perform various stunts and maintain a fit appearance. This role, which he played from 1980 to 1988. necessitated a rigorous fitness routine to meet the show's demands. setting the stage for his long-term commitment to health and wellness.
Fitness Regimen
Workout Routine
Tom Selleck health and fitness regimen has evolved. adapting to his changing roles and age. During his "Magnum, P.I." days. Selleck's workouts were intense and focused on building and maintaining muscle mass. His routine included weightlifting, cardiovascular exercises. and specific training for the stunts he performed on the show.
Selleck adjusted his fitness routine as he aged to suit his body's needs. Today, his workouts focus on maintaining flexibility, strength, and cardiovascular health. He incorporates low-impact exercises such as swimming, walking, and light weightlifting. This balanced approach helps him stay fit without putting undue strain on his joints and muscles.
Importance of Flexibility and Mobility
In recent years, Selleck has emphasized the importance of flexibility and mobility in his fitness regimen. Understanding the natural decline in muscle mass and joint flexibility with age. he includes stretching and yoga in his routine. These practices help prevent injuries, improve posture, and maintain mobilit
micro teaching on communication m.sc nursing.pdfAnurag Sharma
Microteaching is a unique model of practice teaching. It is a viable instrument for the. desired change in the teaching behavior or the behavior potential which, in specified types of real. classroom situations, tends to facilitate the achievement of specified types of objectives.
Title: Sense of Taste
Presenter: Dr. Faiza, Assistant Professor of Physiology
Qualifications:
MBBS (Best Graduate, AIMC Lahore)
FCPS Physiology
ICMT, CHPE, DHPE (STMU)
MPH (GC University, Faisalabad)
MBA (Virtual University of Pakistan)
Learning Objectives:
Describe the structure and function of taste buds.
Describe the relationship between the taste threshold and taste index of common substances.
Explain the chemical basis and signal transduction of taste perception for each type of primary taste sensation.
Recognize different abnormalities of taste perception and their causes.
Key Topics:
Significance of Taste Sensation:
Differentiation between pleasant and harmful food
Influence on behavior
Selection of food based on metabolic needs
Receptors of Taste:
Taste buds on the tongue
Influence of sense of smell, texture of food, and pain stimulation (e.g., by pepper)
Primary and Secondary Taste Sensations:
Primary taste sensations: Sweet, Sour, Salty, Bitter, Umami
Chemical basis and signal transduction mechanisms for each taste
Taste Threshold and Index:
Taste threshold values for Sweet (sucrose), Salty (NaCl), Sour (HCl), and Bitter (Quinine)
Taste index relationship: Inversely proportional to taste threshold
Taste Blindness:
Inability to taste certain substances, particularly thiourea compounds
Example: Phenylthiocarbamide
Structure and Function of Taste Buds:
Composition: Epithelial cells, Sustentacular/Supporting cells, Taste cells, Basal cells
Features: Taste pores, Taste hairs/microvilli, and Taste nerve fibers
Location of Taste Buds:
Found in papillae of the tongue (Fungiform, Circumvallate, Foliate)
Also present on the palate, tonsillar pillars, epiglottis, and proximal esophagus
Mechanism of Taste Stimulation:
Interaction of taste substances with receptors on microvilli
Signal transduction pathways for Umami, Sweet, Bitter, Sour, and Salty tastes
Taste Sensitivity and Adaptation:
Decrease in sensitivity with age
Rapid adaptation of taste sensation
Role of Saliva in Taste:
Dissolution of tastants to reach receptors
Washing away the stimulus
Taste Preferences and Aversions:
Mechanisms behind taste preference and aversion
Influence of receptors and neural pathways
Impact of Sensory Nerve Damage:
Degeneration of taste buds if the sensory nerve fiber is cut
Abnormalities of Taste Detection:
Conditions: Ageusia, Hypogeusia, Dysgeusia (parageusia)
Causes: Nerve damage, neurological disorders, infections, poor oral hygiene, adverse drug effects, deficiencies, aging, tobacco use, altered neurotransmitter levels
Neurotransmitters and Taste Threshold:
Effects of serotonin (5-HT) and norepinephrine (NE) on taste sensitivity
Supertasters:
25% of the population with heightened sensitivity to taste, especially bitterness
Increased number of fungiform papillae
New Drug Discovery and Development .....NEHA GUPTA
The "New Drug Discovery and Development" process involves the identification, design, testing, and manufacturing of novel pharmaceutical compounds with the aim of introducing new and improved treatments for various medical conditions. This comprehensive endeavor encompasses various stages, including target identification, preclinical studies, clinical trials, regulatory approval, and post-market surveillance. It involves multidisciplinary collaboration among scientists, researchers, clinicians, regulatory experts, and pharmaceutical companies to bring innovative therapies to market and address unmet medical needs.
The Gram stain is a fundamental technique in microbiology used to classify bacteria based on their cell wall structure. It provides a quick and simple method to distinguish between Gram-positive and Gram-negative bacteria, which have different susceptibilities to antibiotics
Ozempic: Preoperative Management of Patients on GLP-1 Receptor Agonists Saeid Safari
Preoperative Management of Patients on GLP-1 Receptor Agonists like Ozempic and Semiglutide
ASA GUIDELINE
NYSORA Guideline
2 Case Reports of Gastric Ultrasound
NVBDCP.pptx Nation vector borne disease control programSapna Thakur
NVBDCP was launched in 2003-2004 . Vector-Borne Disease: Disease that results from an infection transmitted to humans and other animals by blood-feeding arthropods, such as mosquitoes, ticks, and fleas. Examples of vector-borne diseases include Dengue fever, West Nile Virus, Lyme disease, and malaria.
NVBDCP.pptx Nation vector borne disease control program
Getfilestruct zbksh(1)
1. #!/usr/bin/ksh93
#!/bin/zsh
#!/bin/bash
################################################################
####
#### This script will run in KornShell93, Zshell, or Bash, all you need to do
#### is put the desired "shebang" line at the top of the script.
####
################################################################
function usagemsg_getfilestruct_zbksh {
CMD_ECHO="${GBL_ECHO:-echo -e }"
[[ "_${SHCODE}" == "_korn" ]] && typeset CMD_ECHO="${GBL_ECHO:-echo -e }"
[[ "_${SHCODE}" == "_bash" ]] && declare CMD_ECHO="${GBL_ECHO:-echo -e }"
${CMD_ECHO} ""
${CMD_ECHO} "${1:+Program: ${1}}${2:+ Version: ${2}}"
${CMD_ECHO} ""
${CMD_ECHO} "This script builds arrays of values representing directory and
file"
${CMD_ECHO} "names, with owner, group, and permissions. It will also generate
the"
${CMD_ECHO} "commands necessary to recreate the directory structure, and to
restore"
${CMD_ECHO} "the owner, group, and permissions to all directories and files
under a"
${CMD_ECHO} "top level directory."
${CMD_ECHO} ""
${CMD_ECHO} "Usage: ${1} [-v|-V] [-a] [-c] [-s] [-d|-f] [-R /Alt_Root] TopDir"
${CMD_ECHO} ""
${CMD_ECHO} " Where '-v' = Verbose mode"
${CMD_ECHO} " '-V' = Very Verbose mode"
${CMD_ECHO} " '-a' = Generate Arrays of values as Output"
${CMD_ECHO} " (Default: array definitions)"
${CMD_ECHO} " '-c' = Generate commands to create directory
structures"
${CMD_ECHO} " (Default: array definitions)"
${CMD_ECHO} " '-s' = Generate commands to create Symbolic Links"
${CMD_ECHO} " (Default: OFF)"
${CMD_ECHO} " '-d' = Only gather directory structure information"
${CMD_ECHO} " (Default: Files and Directories)"
${CMD_ECHO} " '-f' = Only gather file information"
${CMD_ECHO} " (Default: Files and Directories)"
${CMD_ECHO} " '-R /ALT_ROOT' = Add an alternate root directory to
every path"
${CMD_ECHO} " This directory does not need to
actually exist"
${CMD_ECHO} " Useful for chroot'ed dirs or ALT_DISK
filesystems"
${CMD_ECHO} " (Default: NUL)"
${CMD_ECHO} ""
${CMD_ECHO} " TopDir = The full path directory name from which to"
${CMD_ECHO} " extract the directory and file structure"
${CMD_ECHO} ""
${CMD_ECHO} "Author: Dana French (dfrench@mtxia.com)"
${CMD_ECHO} "Copyright 2007-2015, All Rights Reserved"
${CMD_ECHO} ""
${CMD_ECHO} ""AutoContent" enabled"
${CMD_ECHO} ""Multi-Shell" enabled"
${CMD_ECHO} ""
}
################################################################
####
#### Description:
####
#### This script builds arrays of values representing directory and file
2. #### names, with owner, group, and permissions. It will also generate the
#### commands necessary to recreate the directory structure, and to restore
#### the owner, group, and permissions to all directories and files under a
#### top level directory.
####
#### This script can operate in two modes: Array or Command generating.
#### In "Array" mode, KornShell93/Bash code is generated is used
#### to define an array of values containing the directory information
#### and attributes. In "Command" mode, unix style commands are generated
#### to recreate the directory structure and attributes. The default is
#### "Array" mode.
####
#### Assumptions:
####
#### If you are using this script to build arrays of values, it is assumed
#### the number of files in the specified top level directory will be limited
#### on only a few thousand. This is because the values are stored in shell
#### variable arrays which are limited in size, depending upon the platform.
#### You will need to test this on your own system to determine the actual
#### limitations.
####
#### Dependencies:
####
#### This script is dependent upon the following Unix utilities:
#### ksh93, bash, or zsh
#### ls
#### find
#### uname
####
#### Products:
####
#### This script generates KornShell93/Bash Compliant commands that can
#### be used to define an array of values, or this script can generate
#### Unix commands to create the directory structure and its attributes.
####
#### Configured Usage:
####
#### This script can be run from the command line, used as a function, or
#### called from a function library.
####
#### Details:
####
################################################################
function getfilestruct_zbksh
{
if [[ "_${SHCODE}" == "_korn" ]] ||
[[ "_${SHCODE}" == "_zshell" ]]
then
typeset VERSION="3.1-zbksh"
typeset TRUE="${TRUE:-1}"
typeset FALSE="${FALSE:-0}"
typeset CMD_ECHO="${GBL_ECHO:-echo -e }"
typeset VERBOSE="${FALSE}"
typeset VERYVERB="${FALSE}"
typeset GENCMDS="${FALSE}"
typeset GENSLNK="${FALSE}"
typeset GENARYS="${FALSE}"
typeset SHWDIRS="${TRUE}"
typeset SHWFILS="${TRUE}"
typeset DCNT="0"
typeset FCNT="0"
typeset SCNT="0"
typeset ALT_ROOT=""
4. SHWFILS="${TRUE}"
DCNT="0"
FCNT="0"
SCNT="0"
ALT_ROOT=""
CMD=""
fi
################################################################
while getopts ":vVcasdfR:" OPTION
do
case "${OPTION}" in
'a') GENARYS="${TRUE}";;
'c') GENCMDS="${TRUE}";;
's') GENSLNK="${TRUE}";;
'd') SHWFILS="${FALSE}";; # Yes, -d turns off showing files
'f') SHWDIRS="${FALSE}";; # Yes, -f turns off showing dirs
'R') ALT_ROOT="${OPTARG}";;
'v') VERBOSE="${TRUE}";;
'V') VERBOSE="${TRUE}"
VERYVERB="${TRUE}";;
'?') usagemsg_getfilestruct_zbksh "${0}" "${VERSION}" && return 1 ;;
esac
done
shift $(( ${OPTIND} - 1 ))
################################################################
trap "usagemsg_getfilestruct_zbksh ${0} ${VERSION} " EXIT
MACHNAME=$( uname -n )
DIRID1="${1:?ERROR: Top level directory not specified}"
if [[ ! -d "${DIRID1}" ]]
then
${CMD_ECHO} "# ERROR: "${DIRID1}" is not a directory or does not exist"
return 4
fi
if (( GENARYS == FALSE )) &&
(( GENCMDS == FALSE ))
then
GENARYS="${TRUE}"
fi
if (( SHWFILS == FALSE )) &&
(( SHWDIRS == FALSE ))
then
${CMD_ECHO} "# ERROR: Do not specify both -d and -f, you must specify one or
the other, or neither."
return 2
fi
trap "-" EXIT
################################################################
DCNT="0"
FCNT="0"
SCNT="0"
DIRIDX="${DIRID1##*/}"
(( ${#DIRIDX} > 8 )) && DIRIDX="${DIRIDX:0:8}"
5. (( VERBOSE == TRUE )) && ${CMD_ECHO} "${SHEBANG:-#!/usr/bin/ksh93}"
(( VERBOSE == TRUE )) && ${CMD_ECHO}
"################################################################"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Program Name..........: ${0}"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Version...............: ${VERSION}"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Script Execution Mode.: ${SHCODE}"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Copyright Info........: Copyright 2007-
2015 by Dana French, All Rights Reserved"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Local hostname........: ${MACHNAME}"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Top Level Directory...: ${DIRID1}"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "# Variable index name...: ${DIRIDX}"
(( VERBOSE == TRUE )) && (( SHWFILS == TRUE )) && ${CMD_ECHO} "# Show
Files............: TRUE"
(( VERBOSE == TRUE )) && (( SHWFILS == FALSE )) && ${CMD_ECHO} "# Show
Files............: FALSE"
(( VERBOSE == TRUE )) && (( SHWDIRS == TRUE )) && ${CMD_ECHO} "# Show
Directories......: TRUE"
(( VERBOSE == TRUE )) && (( SHWDIRS == FALSE )) && ${CMD_ECHO} "# Show
Directories......: FALSE"
(( VERBOSE == TRUE )) && (( GENCMDS == TRUE )) && ${CMD_ECHO} "# Generate
Commands.....: TRUE"
(( VERBOSE == TRUE )) && (( GENCMDS == FALSE )) && ${CMD_ECHO} "# Generate
Commands.....: FALSE"
(( VERBOSE == TRUE )) && (( GENARYS == TRUE )) && ${CMD_ECHO} "# Generate
Arrays.......: TRUE"
(( VERBOSE == TRUE )) && (( GENARYS == FALSE )) && ${CMD_ECHO} "# Generate
Arrays.......: FALSE"
(( VERBOSE == TRUE )) && (( GENSLNK == TRUE )) && ${CMD_ECHO} "# Generate Sym
Link CMDS: TRUE"
(( VERBOSE == TRUE )) && (( GENSLNK == FALSE )) && ${CMD_ECHO} "# Generate Sym
Link CMDS: FALSE"
${CMD_ECHO} ""
${CMD_ECHO} "ALT_ROOT="${ALT_ROOT}""
################################################################
####
#### The first thing the "getfilestruct" script does is to execute a "find"
#### command to retrieve all the directories under the top level directory
#### specified on the command line when the script was run. The "find"
#### command produces "ls -ld" style output for the purpose of extracting and
#### processing the attributes associated with each directory.
####
################################################################
(( SHWFILS == FALSE )) && (( SHWDIRS == TRUE )) && CMD='find "${DIRID1%/}"
-type d -exec ls -ld {} ;'
(( SHWFILS == TRUE )) && (( SHWDIRS == FALSE )) && CMD='find "${DIRID1%/}" !
-type d -exec ls -ld {} ;'
(( SHWFILS == TRUE )) && (( SHWDIRS == TRUE )) && CMD='find "${DIRID1%/}"
-exec ls -ld {} ;'
(( SHWFILS == FALSE )) && (( SHWDIRS == FALSE )) && return 3
eval ${CMD} | while read -r -- RAWPERMS RAWLINKS RAWOWNER RAWGROUP RAWSIZE
RAWDATE1 RAWDATE2 RAWDATE3 RAWFNAME
do
################################################################
####
6. #### If the file is a symbolic link, generate the command to recreate the
#### symbolic link and continue with the next file.
####
################################################################
if [[ "_${RAWPERMS}" == _l* ]]
then
LNAME="${RAWFNAME##* -> }"
SNAME="${RAWFNAME% -> *}"
[[ "_${LNAME}" != _/* ]] && LNAME="${SNAME%/*}/${LNAME}"
if (( GENARYS == TRUE ))
then
${CMD_ECHO} "n#### symbolic link "${RAWFNAME}""
${CMD_ECHO} "SYM_${DIRIDX}_SNAME[${SCNT}]="${ALT_ROOT}${SNAME}""
${CMD_ECHO} "SYM_${DIRIDX}_FLINK[${SCNT}]="${ALT_ROOT}${LNAME}""
SCNT=$(( ${SCNT} + 1 ))
fi
if (( GENSLNK == TRUE ))
then
${CMD_ECHO} "n#### Generate symbolic link "${RAWFNAME}""
${CMD_ECHO} "ln -s "${LNAME}" "${SNAME}""
else
${CMD_ECHO} "n#### Skipping symbolic link "${RAWFNAME}""
${CMD_ECHO} "# ln -s "${LNAME}" "${SNAME}""
fi
continue
fi
################################################################
####
#### The file owner and group are easily
#### extracted from the "ls -ld" output, however the permissions require
#### some processing.
####
################################################################
# extract the owner for the directory from the ls -l output
DOWNER="${RAWOWNER}"
# extract the group for the directory from the ls -l output
DGROUP="${RAWGROUP}"
# extract the permission settings for the directory from the ls -l output
PERMS="${RAWPERMS:1:9}"
# extract the name of the directory from the ls -l output
DIRNAME="${RAWFNAME}"
[[ "_${DIRNAME}" == *lost+found ]] && continue
################################################################
####
#### The permission settings are contained within the first 10 characters
#### of the "ls -ld" output and are processed in 3 steps. The first character
#### is the file type and is ignored, the next 3 characters are associated
#### with the "user" or file owner permissions. The permissions are
#### checked to see if the tacky bit or SUID bit is set. If so
#### the appropriate permission setting is added to the permission string
#### which will be used when directory permissions are set.
####
################################################################
# extract the user permission settings for the directory from the ls -ld output
7. UPERMS="${PERMS:0:3}"
# remove the dashes "-" from the user permissions
UPERMS="${UPERMS//-/}"
# Convert lowercase "s" to "xs" in the user permissions
UPERMS="${UPERMS//s/xs}"
# Convert uppercase "S" to "s" in the user permissions
UPERMS="${UPERMS//S/s}"
# Convert lowercase "t" to "xt" in the user permissions
UPERMS="${UPERMS//t/xt}"
# Convert uppercase "T" to "t" in the user permissions
UPERMS="${UPERMS//T/t}"
################################################################
####
#### The next set of 3 characters are associated with the "group"
#### category of permissions. The permissions are checked to see
#### if the tacky bit or SUID bit is set. If so the appropriate
#### permission setting is added to the permission string which will
#### be used when the directory permissions are set.
####
################################################################
# extract the group permission settings for the directory from the ls -ld output
GPERMS="${PERMS:3:3}"
# remove the dashes "-" from the group permissions
GPERMS="${GPERMS//-/}"
# Convert lowercase "s" to "xs" in the group permissions
GPERMS="${GPERMS//s/xs}"
# Convert uppercase "S" to "s" in the group permissions
GPERMS="${GPERMS//S/s}"
# Convert lowercase "t" to "xt" in the group permissions
GPERMS="${GPERMS//t/xt}"
# Convert uppercase "T" to "t" in the group permissions
GPERMS="${GPERMS//T/t}"
################################################################
####
#### The last set of 3 characters are associated with the "other"
#### category of permissions. Again, the permissions are checked to see
#### if the tacky bit or SUID bit is set. If so the appropriate permission
#### setting is added to the permission string which will be used when the
#### directory permissions are set.
####
################################################################
# extract the other permission settings for the directory from the ls -ld output
OPERMS="${PERMS:6:3}"
# remove the dashes "-" from the other permissions
OPERMS="${OPERMS//-/}"
# Convert lowercase "s" to "xs" in the other permissions
OPERMS="${OPERMS//s/xs}"
# Convert uppercase "S" to "s" in the other permissions
OPERMS="${OPERMS//S/s}"
# Convert lowercase "t" to "xt" in the other permissions
OPERMS="${OPERMS//t/xt}"
# Convert uppercase "T" to "t" in the other permissions
OPERMS="${OPERMS//T/t}"
################################################################
####
#### With the permission setting strings for each user category now known
#### and extracted from the "ls -ld" output, a mnemonic "exact setting"
#### string is constructed for use with the "chmod" command.
####
8. ################################################################
# Build the mnemonic mode exact permission setting command
DMODE="u=${UPERMS},g=${GPERMS},o=${OPERMS}"
(( VERBOSE == TRUE )) && ${CMD_ECHO} "n#### n#### ${MACHNAME}:${DMODE}:$
{DOWNER}:${DGROUP}:${DIRNAME}"
################################################################
#### Depending upon the options specified when this script was run,
#### either KornShell93/Bash compliant commands or Unix commands will
#### be generated.
####
#### The generated KornShell93/Bash Compliant commands can be used to
#### define a variable array of values which contain the directory name
#### and various attributes associated with each directory.
####
#### The Unix commands generated consist of mkdir, chown, chgrp, and
#### chmod, which can be used to create the directory and change its
#### attributes to match those of the original directory.
####
################################################################
if [[ -d "${DIRNAME}" ]]
then
(( VERBOSE == TRUE )) && ${CMD_ECHO} "n${CMD_ECHO} "# Working on $
{DIRNAME}""
if (( GENARYS == TRUE ))
then
${CMD_ECHO} "DIR_${DIRIDX}_DNAME[${DCNT}]="${ALT_ROOT}$
{DIRNAME}";"
${CMD_ECHO} "DIR_${DIRIDX}_OWNER[${DCNT}]="${DOWNER}";"
${CMD_ECHO} "DIR_${DIRIDX}_GROUP[${DCNT}]="${DGROUP}";"
${CMD_ECHO} "DIR_${DIRIDX}_CHMOD[${DCNT}]="${DMODE}";"
fi
if (( GENCMDS == TRUE ))
then
${CMD_ECHO} "mkdir -p "${ALT_ROOT}${DIRNAME}";"
${CMD_ECHO} "chown ${DOWNER} "${ALT_ROOT}${DIRNAME}";"
${CMD_ECHO} "chgrp ${DGROUP} "${ALT_ROOT}${DIRNAME}";"
${CMD_ECHO} "chmod "${DMODE}" "${ALT_ROOT}${DIRNAME}";"
fi
DCNT=$(( ${DCNT} + 1 ))
else
if (( GENARYS == TRUE ))
then
${CMD_ECHO} "FIL_${DIRIDX}_FNAME[${FCNT}]="${ALT_ROOT}$
{DIRNAME}";"
${CMD_ECHO} "FIL_${DIRIDX}_OWNER[${FCNT}]="${DOWNER}";"
${CMD_ECHO} "FIL_${DIRIDX}_GROUP[${FCNT}]="${DGROUP}";"
${CMD_ECHO} "FIL_${DIRIDX}_CHMOD[${FCNT}]="${DMODE}";"
fi
if (( GENCMDS == TRUE ))
then
${CMD_ECHO} "chown ${DOWNER} "${ALT_ROOT}${DIRNAME}";"
${CMD_ECHO} "chgrp ${DGROUP} "${ALT_ROOT}${DIRNAME}";"
${CMD_ECHO} "chmod "${DMODE}" "${ALT_ROOT}${DIRNAME}";"
9. fi
FCNT=$(( ${FCNT} + 1 ))
fi
done
return 0
}
################################################################
################################################################
################################################################
####
#### Main Body of Script Begins Here
####
################################################################
TRUE="1"
FALSE="0"
####
#### Extract the "shebang" line from the beginning of the script
read SHEBANG < "${0}"
export SHEBANG
####
#### Test the "shebang" line to determine what shell interpreter is specified
SHCODE="unknown"
[[ "_${SHEBANG}" == _*/ksh* ]] && SHCODE="korn"
[[ "_${SHEBANG}" == _*/bash* ]] && SHCODE="bash"
[[ "_${SHEBANG}" == _*/zsh* ]] && SHCODE="zshell"
export SHCODE
####
#### Modify the commands and script according to the shell intpreter
GBL_ECHO="echo -e"
[[ "_${SHCODE}" == "_korn" ]] && GBL_ECHO="print --"
[[ "_${SHCODE}" == "_zshell" ]] && GBL_ECHO="print --" && emulate ksh93
[[ "_${SHCODE}" == "_bash" ]] && shopt -s extglob # Turn on extended
globbing
####
#### Call the script function to begin processing
getfilestruct_zbksh "${@}"
exit ${?}
10. fi
FCNT=$(( ${FCNT} + 1 ))
fi
done
return 0
}
################################################################
################################################################
################################################################
####
#### Main Body of Script Begins Here
####
################################################################
TRUE="1"
FALSE="0"
####
#### Extract the "shebang" line from the beginning of the script
read SHEBANG < "${0}"
export SHEBANG
####
#### Test the "shebang" line to determine what shell interpreter is specified
SHCODE="unknown"
[[ "_${SHEBANG}" == _*/ksh* ]] && SHCODE="korn"
[[ "_${SHEBANG}" == _*/bash* ]] && SHCODE="bash"
[[ "_${SHEBANG}" == _*/zsh* ]] && SHCODE="zshell"
export SHCODE
####
#### Modify the commands and script according to the shell intpreter
GBL_ECHO="echo -e"
[[ "_${SHCODE}" == "_korn" ]] && GBL_ECHO="print --"
[[ "_${SHCODE}" == "_zshell" ]] && GBL_ECHO="print --" && emulate ksh93
[[ "_${SHCODE}" == "_bash" ]] && shopt -s extglob # Turn on extended
globbing
####
#### Call the script function to begin processing
getfilestruct_zbksh "${@}"
exit ${?}