Sponsored Content
Top Forums Shell Programming and Scripting script not working...select utility Post 302192937 by mobydick on Thursday 8th of May 2008 06:05:24 AM
Old 05-08-2008
script not working...select utility

#!/usr/bin/bash


name="$@"


myname=malay
#echo $myname

select firstname in $name;
do
if [$firstname!= $myname];then
echo $firstname
else
break
fi
done

invoking with:-
./script.sh one two three four five six seven eight nine malay
according to me the program control should come out when i will select the entry having my name[malay] but its not happening

can any one point out the error
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cdrdao utility script

friends, i love ya... i wrote a script to automate using cdrdao to burn an audio cd from mp3 files, using the great tutorial at http://tldp.org/HOWTO/MP3-CD-Burning/index.html (check out the site, i believe that it's very well-written). i messed around with it and got to a place where i felt... (2 Replies)
Discussion started by: snwright
2 Replies

2. Shell Programming and Scripting

sort utility in script ?

Hi friends, I want to use sort command in script. I used the following syntax in my scipt, sort -t '|' +3 tempcdrext4.cdr > temp.mocdr It give me a error " Input file specified two times." but this command work fine in the prompt without any problem. Can sombody please tell me who... (2 Replies)
Discussion started by: maheshsri
2 Replies

3. UNIX for Dummies Questions & Answers

Need help on SCRIPT(1M) utility

Hi All, I need to do a lot of manual entries at shell prompt. So to collect the logs(each command fired in that session, i use "SCRIPT(1) : make typescript of terminal session" this is kool,but the problem here is that it saves the linefeed, and backspaces along with the commands in the log... (1 Reply)
Discussion started by: amit4g
1 Replies

4. Shell Programming and Scripting

Help on how to call a utility from script

Hi, I am new to shell scripting (sh) I need a script which will call a utility & once u call it.It will ask for inputs on the screen.These inputs it needs to get or read from a txt file. for e.g #! /bin/sh while read line do echo $line done txt file will have test 01/01/2008 ... (3 Replies)
Discussion started by: innocent
3 Replies

5. Shell Programming and Scripting

Writing a Utility Script

Hi All ,, I have couple of shell scripts .. I am trying to build a Utility script which would call each script example :: ======== 1) uni.sh 2) uni2.sh 3)uni3.sh when i run the Util script it will come as a menu ,, once i press 1 it will call the first shell script and runs it ..... (10 Replies)
Discussion started by: raghav1982
10 Replies

6. Shell Programming and Scripting

select contents between two delimiters (not working if newline in encountered)

Hi, I am facing difficulties in selecting the contents between two delimiters when there is a new line occurs.. Eg: >more sample.txt abcd -- this is the first line % efgh-- this is the second line and not able to print % ijkl -- this is the 3rd line % when i search for abcd and... (8 Replies)
Discussion started by: Balaji PK
8 Replies

7. Homework & Coursework Questions

script similar to rm utility

1. The problem statement, all variables and given/known data: saferm is a replacement for the rm utility. Rather than removing files, it move files in a sub directoy called".saferm" in the user's home directory. If "~/.saferm" doesn't exist, it is automatically created. The -l options lists the ... (3 Replies)
Discussion started by: Joey12
3 Replies

8. OS X (Apple)

Using at utility on 10.8.2 not working

I am a beginner, trying to get basic background utilities like at and cron to work on mac os x. I am typing the following at the prompt: at now + 1 minute open -a textedit ^D nothing happens at the appointed time. What to change? (7 Replies)
Discussion started by: sakurashinken
7 Replies

9. Solaris

Expect utility not working for Solaris 11

iam withdrawing this thread , It was my mistake I didn't read the code properly (0 Replies)
Discussion started by: boncuk
0 Replies

10. Shell Programming and Scripting

lftp is not working.how to replace lftp with expect utility using same .cfg file.

We have lftp command inside shell file. which is intern calling .cfg file for transferring the file from one server to other. Below command to not working. lftp -e "set net:max-retries 1; set net:reconnect-interval-base 1; put -E -O /destinationdir/inbox/ /sourcedir/test.txt; bye" -u... (4 Replies)
Discussion started by: johnsnow
4 Replies
Jifty::Plugin::OpenID(3pm)				User Contributed Perl Documentation				Jifty::Plugin::OpenID(3pm)

NAME
Jifty::Plugin::OpenID - Provides OpenID authentication for your jifty app DESCRIPTION
Provides OpenID authentication for your app USAGE
Config please provide "OpenIDSecret" in your etc/config.yml , the "OpenIDUA" is optional , OpenID Plugin will use LWPx::ParanoidAgent by default. --- application: OpenIDSecret: 1234 OpenIDUA: LWP::UserAgent or you can set "OpenIDUserAgent" environment var in command-line: OpenIDUserAgent=LWP::UserAgent bin/jifty server if you are using LWPx::ParanoidAgent as your openid agent. you will need to provide "JIFTY_OPENID_WHITELIST_HOST" for your own OpenID server. export JIFTY_OPENID_WHITELIST_HOST=123.123.123.123 User Model Create your user model , and let it uses Jifty::Plugin::OpenID::Mixin::Model::User to mixin "openid" column. and a "name" method. use TestApp::Record schema { column email => type is 'varchar'; }; use Jifty::Plugin::OpenID::Mixin::Model::User; sub name { my $self = shift; return $self->email; } Note: you might need to declare a "name" method. because the OpenID CreateOpenIDUser action and SkeletonApp needs current_user->username to show welcome message and success message , which calls "brief_description" method. See Jifty::Record for "brief_description" method. View OpenID plugin provides AuthenticateOpenID Action. so that you can render an AuthenticateOpenID in your template: form { my $openid = new_action( class => 'AuthenticateOpenID', moniker => 'authenticateopenid' ); render_action( $openid ); }; this action renders a form which provides openid url field. and you will need to provide a submit button in your form. form { my $openid = new_action( class => 'AuthenticateOpenID', moniker => 'authenticateopenid' ); # .... render_action( $openid ); outs_raw( Jifty->web->return( to => '/openid_verify_done', label => _("Login with OpenID"), submit => $openid )); }; the "to" field is for verified user to redirect to. so that you will need to implement a template called "/openid_verify_done": template '/openid_verify_done' => page { h1 { "Done" }; }; Attribute Exchange You can retrieve information from remote profile on authentication server with OpenID Attribute Exchange service extension. Set in your config.yml - OpenID: ax_param: openid.ns.ax=http://openid.net/srv/ax/1.0&openid.ax.mode=fetch_request&openid.ax.type.email=http://axschema.org/contact/email&openid.ax.type.firstname=http://axschema.org/namePerson/first&openid.ax.type.lastname=http://axschema.org/namePerson/last&openid.ax.required=firstname,lastname,email ax_values: value.email,value.firstname,value.lastname ax_mapping: "{ 'email': 'value.email', 'name': 'value.firstname value.lastname' }" this parameters are usuable for all OpenID endpoints supporting Attribute Exchange extension. They can be overriden in your application. Watch and/or override "openid/wayf" template from Jifty::Plugin::OpenID::View. Or you can use in your view "show('openid/wayf','/url_return_to');". ax_param is the url send to authentication server. It defines namespace, mode, attributes types and requested attributes. hints : MyOpenID use schema.openid.net schemas instead of axschema.org, Google provides lastname and firstname, Yahoo only fullname ax_values keys of attributes values read from authentication server response. ax_mapping mapping of receive values with our application fields in json format. AUTHORS
Alex Vandiver, Cornelius <cornelius.howl {at} gmail.com >, Yves Agostini LICENSE
Copyright 2005-2010 Best Practical Solutions, LLC. This program is free software and may be modified and distributed under the same terms as Perl itself. perl v5.10.1 2010-01-18 Jifty::Plugin::OpenID(3pm)
All times are GMT -4. The time now is 05:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy