Sponsored Content
Top Forums Shell Programming and Scripting script to tell whether there exists directory or not Post 302712963 by dbashyam on Wednesday 10th of October 2012 05:30:02 AM
Old 10-10-2012
ok I will make that simple,

I want to just grep the '12.5.0.2307' from a command output

############################################################################
CA IT Client Manager
--------------------
Agent - Basic Hardware Inventory 12.5.0.2307
Agent - Asset Management 12.5.0.2307
Agent - Data Transport 12.5.0.2307
Agent - Software Delivery 12.5.0.2307
Agent - Deployment 12.5.0.2307
############################################################################

Code:
runtask <servername> 'version.sh | grep '12.5.0.2307' '

The above command gives me full output of the text file since it matches all the 12.5.0.2307 I want to grep just '12.5.0.2307' alone...I don't want the whole line just the 12.5.0.2307, how to achieve this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check if directory exists

Hi, I need to prompt for a response from a user to enter a path read dest_dir?"Please Enter Directory :" How do I do this until a valid directory is entered by the user. I can use to check the existence of the directory. However when I try the following I cannot get it to work. while ... (2 Replies)
Discussion started by: jerardfjay
2 Replies

2. UNIX for Dummies Questions & Answers

Directory exists

Hi all, Sorry about this i'm sure this is a very silly question hence an easy answer but: I'm trying to write a script, part of which I want to check if a directory exists, if it doesn't then create it. Thanks for your help Tez (3 Replies)
Discussion started by: tez
3 Replies

3. Shell Programming and Scripting

how to check if masked directory exists?

I'm trying to write a script that identifies whether a directory of the form AWL.????????.IP exists. I have one that exists which is AWL.05301032.IP. When I test like this: If ] I get true, but when I test like this: If ] Or like this If ] Or any other variation of wild cards, I... (4 Replies)
Discussion started by: philplasma
4 Replies

4. UNIX for Dummies Questions & Answers

How can I check if directory exists in a makefile

Hi. I what to write a make file that inside a target I want to check if a directory exists. some like: ### make a: if ;then <command 1> else <command 2> fi ### make end Thanks a lot ---------------------- (2 Replies)
Discussion started by: zivsegal
2 Replies

5. Shell Programming and Scripting

Problem when test to see if directory exists

Hi, I'm writing a shell script that will create a folder if it does not exist yet. Here's the script: (this if statement is inside a while loop) folderName="Pics" if ! test -d folderName then mkdir $folderName fi However, after the folder Pics has been created, every time the... (3 Replies)
Discussion started by: trivektor
3 Replies

6. Shell Programming and Scripting

perl, if directory exists

Hi there I am trying to make a fuction that looks for a email profile that ends in .$ARGV here is the code if (-d "/Users/$ARGV/Library/Thunderbird/Profiles/*.$ARGV") { print "\n WARNING: Email profile already exits\n\n"; exit; } but for some reason it does... (2 Replies)
Discussion started by: ab52
2 Replies

7. Shell Programming and Scripting

how to check if a directory exists or not.if not need to create it

Hi, I am using solaris 10 OS and bash shell.just checking for small code snippet which follows below. /export/home/vomappservers/spa/common/5.0 /export/home/vomappservers/spa/common/scripts /export/home/vomappservers/spa/tools /export/home/vomappservers/spa/scm5.0/SCCS... (5 Replies)
Discussion started by: muraliinfy04
5 Replies

8. Shell Programming and Scripting

Shell Script for generating NTIDs(Usernames) from the email ids which exists in MSAD Directory

Hi Everyone, I just need a shell script which automatically gives the list of NT IDs mean the Usernames from the list of email ids. We have around 140 users from AMERICAS,ASIAPACIFIC and EMEA User Directories and we have their email ids.For ex. i have email id called naveen-kumar.dasu@hp.com... (7 Replies)
Discussion started by: naveen.dasu
7 Replies

9. Shell Programming and Scripting

Check whether file exists in directory

Hi guys, I am beginner trying to learn unix. So any help is welcomed. My requirement is to check whether is a file exists in a particular directory or not. The directory path and filename are taken dynamically with user interaction. So the program should continue only if the $filename... (1 Reply)
Discussion started by: maris_markur
1 Replies

10. UNIX for Beginners Questions & Answers

Check that at least one file exists in the directory.

There are some files with suffix dates like abc_20032019.dat abc_17032019.dat If at least one file exists then perform some operation else exit from execution. Korn shell ---------------------------------- array=($inputdir/abc*.dat) If ] ] then echo " file exits" else echo " file does... (10 Replies)
Discussion started by: Rajesh123
10 Replies
SLAPPASSWD(8C)															    SLAPPASSWD(8C)

NAME
slappasswd - OpenLDAP password utility SYNOPSIS
/usr/sbin/slappasswd [-v] [-u] [-s secret|-T file] [-h hash] [-c salt-format] DESCRIPTION
Slappasswd is used to generate an userPassword value suitable for use with ldapmodify(1) or slapd.conf(5) rootpw configuration directive. OPTIONS
-v enable verbose mode. -u Generate RFC 2307 userPassword values (the default). Future versions of this program may generate alternative syntaxes by default. This option is provided for forward compatibility. -s secret The secret to hash. If this and -T are absent, the user will be prompted for the secret to hash. -s and -T and mutually exclusive flags. -T file Hash the contents of the file. If this and -s are absent, the user will be prompted for the secret to hash. -s and -T and mutually exclusive flags. -h scheme If -h is specified, one of the following RFC 2307 schemes may be specified: {CRYPT}, {MD5}, {SMD5}, {SSHA}, and {SHA}. The default is {SSHA}. {SHA} and {SSHA} use the SHA-1 algorithm (FIPS 160-1), the latter with a seed. {MD5} and {SMD5} use the MD5 algorithm (RFC 1321), the latter with a seed. {CRYPT} uses the crypt(3). {CLEARTEXT} indicates that the new password should be added to userPassword as clear text. -c crypt-salt-format Specify the format of the salt passed to crypt(3) when generating {CRYPT} passwords. This string needs to be in sprintf(3) format and may include one (and only one) %s conversion. This conversion will be substituted with a string random characters from [A-Za-z0-9./]. For example, "%.2s" provides a two character salt and "$1$%.8s" tells some versions of crypt(3) to use an MD5 algo- rithm and provides 8 random characters of salt. The default is "%s", which provides 31 characters of salt. LIMITATIONS
The practice storing hashed passwords in userPassword violates Standard Track (RFC 2256) schema specifications and may hinder interoper- ability. A new attribute type, authPassword, to hold hashed passwords has been defined (RFC 3112), but is not yet implemented in slapd(8). SECURITY CONSIDERATIONS
Use of hashed passwords does not protect passwords during protocol transfer. TLS or other eavesdropping protections should be inplace before using LDAP simple bind. The hashed password values should be protected as if they were clear text passwords. SEE ALSO
ldappasswd(1), ldapmodify(1), slapd(8) slapd.conf(5) RFC 2307 RFC 2256 RFC 3112 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.1.X RELEASEDATE SLAPPASSWD(8C)
All times are GMT -4. The time now is 08:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy