PS3 and SELECT, is it possible to put a line break?
Hi all,
Before I give up on using SELECT for my first attempt at creating a menu driven script, can anyone please advise if it is possible to include a line break for PS3, I've tried putting in a \n and it does not work.
Tried for both bash and ksh and both gives the same result. Preference is to use ksh.
1) Generic SA
2) Refresh Tasks
3) Others
4) Exit
\n :: Please choose a VALID option :
If someone believes there is a better alternative to using select, formatting wise, please advise. An example may be best if any. I've seen heaps of examples in Google but maybe someone has a proven way of making a menu driven script.
If I have a flatfile like vote.dat
NAME | SEX | DATETIME | VOTE
Jason|M|2005-12-10 08.01.30|Y
Benson|M|2005-12-10 12.01.00|Y
William|M|2005-12-10 08.01.09|Y
Nick|M|2005-12-11 09.01.07|Y
Pascal|M|2005-12-11 01.01.06|Y
Mickey|F|2005-12-12 12.01.30|Y
How can I write a korn script to have... (4 Replies)
hi All,
Have a doubt in ksh..Am not familiar with arrays but i have tried out a script..
plzzzzz correct me with the script
My i/p File is:
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(Host = 192.168.2.2)
(Port = 1525)
)
)
(CONNECT_DATA = (SID = TESTDB1)
)
)
... (7 Replies)
...when the lines use both a colon and commas to separate the parts you want read as information.
The first version of this script used cut and other non-Bash-builtins, frequently, which made it nice and zippy with little more than average processor load in GNOME Terminal but, predictably, slow... (2 Replies)
Hi Folks,
I am new to ksh, i have informatica parameter file that i need to update everyday with shell script. i need your help updating this file with new parameters.
sample data
$$TABLE1_DATE=04-27-2011
$$TABLE2_DATE=04-23-2011
$$TABLE3_DATE=03-19-2011
.......Highligned... (4 Replies)
I cannot seem to get this to work..
I have a file which has about 100 lines, and there is no end of line (line break \n) at the end of each line, and this is causing problem when i paste them into an application.
the file looks like this
this is a test
that is a test
balblblablblhblbha... (1 Reply)
<td>
CIS
</td>and I tried to sed 's/<td>\/nCIS\/n<\/td>/<td><\/td>' and sed 's/<td>\/rCIS\/r<\/td>/<td><\/td>' , but no joy. This is an html page that I need to clean. (4 Replies)
So I'm in a Unix class and our assignment was to go into VI and write a script to make this file tree. At the end of it, I'd like it to echo "This is the file tree you've created" then a line break, then . But I'm not sure as to who to do it. Is there a way for when I run it (./filesystem), the... (4 Replies)
Hi All
I am using the below code to chose a file to view :
PS3="Select file to view : "
select FILE in `ls` QUIT
do
if ; then
clear
cat $FILE
else
break
fi
REPLY=''
done
Everything works fine as long as I am giving the correct choice .
But when i give a... (4 Replies)
PS3="Enter corresponding number and hit enter:"
select DIR in `cat mylist` QUIT
do
if
then
echo "INVALID INPUT"
else
if ; then
my commands .....
else
break
fi
fi
REPLY=''
done
The above will return something like below :
Select from the list of... (4 Replies)
Hello everyone!
I'm trying to make the below file1 look like file2, can anyone help?
Basically I just hit backspace on every line that starts with a number.
Thanks!
file1:
THIS#IS-IT1
4
THIS#IS-IT2
3
THIS#IS-IT3
2
THIS#IS-IT4
1
Result > file2: (4 Replies)
Discussion started by: demmel
4 Replies
LEARN ABOUT OSX
net::ldap::extension::refresh
Net::LDAP::Extension::Refresh(3) User Contributed Perl Documentation Net::LDAP::Extension::Refresh(3)NAME
Net::LDAP::Extension::Refresh - LDAPv3 Refresh extension object (RFC 2589)
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Extension::Refresh;
$ldap = Net::LDAP->new('localhost');
$ldap->bind('cn=admin,dc=example,dc=com', password => 'password');
$mesg = $ldap->refresh(entryName => 'cn=dynamic,dc=example,dc=com',
requestTtl => 100);
die "error :", $mesg->code(), ": ", $mesg->error() if($mesg->code());
print "TTL changed to ", $mesg->get_ttl(), "
";
DESCRIPTION
"Net::LDAP::Extension::Refresh" implements the "Refresh" extended LDAPv3 operation as described in RFC 2589
It implements no object by itself but extends the Net::LDAP object by another method:
METHODS
refresh ( OPTIONS )
Send a refresh operation for an object.
OPTIONS is a list of key/value pairs. The following keys are reconized:
entryName
This option contains the object to refresh. It must be a DN.
requestTtl
This option contains the TTL in seconds requested. The server may choose to set another value as stated in RFC 2589
get_ttl ( )
Return the TTL set by the server during the previous "refresh" call.
This method is a method of the Net::LDAP::Message response object returned in reply to "refresh()" in case the "refresh()" call
succeeded.
SEE ALSO
Net::LDAP, Net::LDAP::Extension
AUTHOR
Etienne Bagnoud <etienne.bagnoud@irovision.ch> Adapted from Graham Barr Net::LDAP::Extension::SetPassword Documentation adapted from Peter
Marschall Net::LDAP::Extension::SetPassword
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2010 Etienne Bagnoud. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
perl v5.16.2 2012-09-20 Net::LDAP::Extension::Refresh(3)