Sponsored Content
Full Discussion: Need smart script !
Top Forums Shell Programming and Scripting Need smart script ! Post 302652575 by mohtashims on Thursday 7th of June 2012 10:13:48 AM
Old 06-07-2012
Question Need smart script !

Hi,

I need a script to assign variables the below paths

Code:
 
/appl/user_projects/domains/<xxx>/servers/<yyy>/logs

Where <xxx> can be any number and name of directories.

<yyy> can be another set of any number of names and directories.

I want to neglect [do not wish to allocated them to variables] all the <xxx> and <yyy> folders that do not have the the complete path uptil [logs] directory as shown above.
 

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

smart question

eg. : there is a file - 322 bytes, how can I (or you) view just a half of file (161 bytes)? (3 Replies)
Discussion started by: zylwyz
3 Replies

2. Shell Programming and Scripting

smart script?

First, I know that's a bad title. I couldn't think of anything short enough. ... I wrote the following script to let me know when various parts of the network are down. It used to look like this before last weekend when I got over 500 emails about 1 host being down all weekend: this is in the... (1 Reply)
Discussion started by: raidzero
1 Replies

3. Shell Programming and Scripting

Smart Backup Script

Hello Im pretty new to scripting in linux but am keen to learn. I'm trying to create a backup script similar to a batch script I developed for windows (dos) where the backup is to a usb drive. no problems with the backup process but what I would like to do is automatically remove old files if... (2 Replies)
Discussion started by: TheGacko
2 Replies

4. UNIX for Dummies Questions & Answers

Explain the difference between the commands cd ~smart and cd ~/smart

Is it possible for both commands to work? (1 Reply)
Discussion started by: phunkypants
1 Replies
createhomedir(1)					    BSD General Commands Manual 					  createhomedir(1)

NAME
createhomedir -- create and populate home directories on the local computer. SYNOPSIS
createhomedir [-scbalh] [-n directoryDomainName] [-u username] DESCRIPTION
createhomedir provides several options for creating and populating home directories. OPTIONS
-s creates home directories for server home paths only (default). -c creates home directories for local home paths only. -b creates home directories for both server and local home paths. -a creates home directories for users defined in all directory domains of the server's search path. -l creates home directories for users defined in the local directory domain. -L causes the created home directory to be localized. -n directoryDomainName creates home directories for users defined in a specific directory domain in the server's search path. -u username creates a home directory for a specific user defined in the domain(s) identified in the -a, -l, or -n parameter. If you omit the -a, -l, and -n parameters when you use the -u parameter, -a is assumed. -i reads username list from standard input and creates specified home directories. Each username should be on its own line. -h usage help. FILES
/usr/sbin/createhomedir location of tool CAVEATS
When using the -a option, search limits of various directory servers (such as Open Directory or Active Directory) can prevent all possible home directories from being created. In this case, you may need to specify the usernames explicitly. Mac OS X May 31, 2019 Mac OS X
All times are GMT -4. The time now is 06:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy