Sponsored Content
Full Discussion: Shell script problem
Top Forums Shell Programming and Scripting Shell script problem Post 302377388 by ryzzaze on Friday 4th of December 2009 01:03:09 AM
Old 12-04-2009
I tryed to do a read before i did the current "passwd" solution but the same thing happens, it just runs past it not lettning me write anyting :/

Edit:

I did try it again with read, but as i said erlier it do not stop to let me type in anyting, it just runs the script and then ends, why? Smilie


Code:
#!/bin/sh

if [ "$#" == "0" ]
then

cat test.cvs | while IFS=';'  read firstname surname;
do

   #useradd $firstname -m
    echo  added $firstname to the system
    read password
    echo $password
    cd /home/$firstname/
    maildirmake.courier Maildir
    echo Maildir Created for $firstname

done
  exit 0
fi


Last edited by ryzzaze; 12-04-2009 at 02:19 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script problem

shell script for sorting,searchingand insertion/deletion of elements in a list (1 Reply)
Discussion started by: jayaram_miryabb
1 Replies

2. UNIX for Dummies Questions & Answers

Shell script problem

Hi, I have a shell script in which I am calling a function from a different shell script. This functions executes the SQL and the results are stored in a log file. If the result of the SQL is "no rows selected" then I need to exit the main shell script. My shell script is executing fine if... (5 Replies)
Discussion started by: shashi_kiran_v
5 Replies

3. Shell Programming and Scripting

Problem in shell script

:confused: Hi, I have written a script which calls a stored procrdure. The Stored procedure has 2 inputs and 6 outputs. I need to capture one of the outputs. But I am not able to get any result from this simple script- ! /bin/ksh echo "connect to dbau user etlbitst using anf1892;" >... (1 Reply)
Discussion started by: arnie_nits
1 Replies

4. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

5. Shell Programming and Scripting

C-Shell Script Problem

I am trying to write a simple script to update clients that are probes with new software, but everytime I run it, it doesn't wait for the download it just runs through the list of clients without finishing the download. I tried to use wait on the pid and I could use sleep for some crazy amount of... (0 Replies)
Discussion started by: gbxfan
0 Replies

6. Shell Programming and Scripting

Problem Shell Script

hy, i have a problem with shell script with sybase. if start single command this script working, but if run into file for example select.sh, the script doesn't create output. Can you help me please ??? thank's USER=`cat $SYBASE/.asepwd | cut -d: -f2 | head -1` PWD=`asepwd.sh $USER... (4 Replies)
Discussion started by: Dolcissimo76
4 Replies

7. AIX

There's problem with shell script...Help me~

Hello, guys... I'm new to IBM AIX server admin. Actuall, I administrate Oracle 10g on it. *SYSTEM INFO - IBM AIX 6 Powerpc - Oracle 10g R2 (10.2.0.4.0 - 64bit) I wrote a script like bellow... DATE='date' cp /oracle/product/10g/network/log/listener_temp.log... (4 Replies)
Discussion started by: daniel han
4 Replies

8. Shell Programming and Scripting

problem in shell script

hi every body this is my first thread in this forum, i hope find a solution for my problem i have to write a script bt i still have some error and i don't know how to correct them $ for i in `seq 500 505`; do ./generateur_tache $i tache$i.txt; nprocs=$i; copt$i=`cat tache$i.txt | ./copt.awk` ;... (10 Replies)
Discussion started by: ordo_ordo
10 Replies

9. Shell Programming and Scripting

Shell script newbie, what is problem with my script?

Hello, Ubuntu server 11.10 can anybody help what is problem with my shell script? #!/bin/bash #script to find out currently logged on user is root or not. if ] then echo "You are super" else echo "You are awesome!" fi When I run script, I get following output ./uid: line 3: I... (4 Replies)
Discussion started by: kaustubh
4 Replies
DBIx::Class::Storage::DBI::Oracle::Generic(3)		User Contributed Perl Documentation	     DBIx::Class::Storage::DBI::Oracle::Generic(3)

NAME
DBIx::Class::Storage::DBI::Oracle::Generic - Oracle Support for DBIx::Class SYNOPSIS
# In your result (table) classes use base 'DBIx::Class::Core'; __PACKAGE__->add_columns({ id => { sequence => 'mysequence', auto_nextval => 1 } }); __PACKAGE__->set_primary_key('id'); # Somewhere in your Code # add some data to a table with a hierarchical relationship $schema->resultset('Person')->create ({ firstname => 'foo', lastname => 'bar', children => [ { firstname => 'child1', lastname => 'bar', children => [ { firstname => 'grandchild', lastname => 'bar', } ], }, { firstname => 'child2', lastname => 'bar', }, ], }); # select from the hierarchical relationship my $rs = $schema->resultset('Person')->search({}, { 'start_with' => { 'firstname' => 'foo', 'lastname' => 'bar' }, 'connect_by' => { 'parentid' => { '-prior' => { -ident => 'personid' } }, 'order_siblings_by' => { -asc => 'name' }, }; ); # this will select the whole tree starting from person "foo bar", creating # following query: # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # START WITH # firstname = 'foo' and lastname = 'bar' # CONNECT BY # parentid = prior personid # ORDER SIBLINGS BY # firstname ASC DESCRIPTION
This class implements base Oracle support. The subclass DBIx::Class::Storage::DBI::Oracle::WhereJoins is for "(+)" joins in Oracle versions before 9.0. METHODS
get_autoinc_seq Returns the sequence name for an autoincrement column datetime_parser_type This sets the proper DateTime::Format module for use with DBIx::Class::InflateColumn::DateTime. connect_call_datetime_setup Used as: on_connect_call => 'datetime_setup' In connect_info to set the session nls date, and timestamp values for use with DBIx::Class::InflateColumn::DateTime and the necessary environment variables for DateTime::Format::Oracle, which is used by it. Maximum allowable precision is used, unless the environment variables have already been set. These are the defaults used: $ENV{NLS_DATE_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS'; $ENV{NLS_TIMESTAMP_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS.FF'; $ENV{NLS_TIMESTAMP_TZ_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS.FF TZHTZM'; To get more than second precision with DBIx::Class::InflateColumn::DateTime for your timestamps, use something like this: use Time::HiRes 'time'; my $ts = DateTime->from_epoch(epoch => time); relname_to_table_alias DBIx::Class uses DBIx::Class::Relationship names as table aliases in queries. Unfortunately, Oracle doesn't support identifiers over 30 chars in length, so the DBIx::Class::Relationship name is shortened and appended with half of an MD5 hash. See "relname_to_table_alias" in DBIx::Class::Storage. with_deferred_fk_checks Runs a coderef between: alter session set constraints = deferred ... alter session set constraints = immediate to defer foreign key checks. Constraints must be declared "DEFERRABLE" for this to work. ATTRIBUTES
Following additional attributes can be used in resultsets. connect_by or connect_by_nocycle Value: \%connect_by A hashref of conditions used to specify the relationship between parent rows and child rows of the hierarchy. connect_by => { parentid => 'prior personid' } # adds a connect by statement to the query: # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # CONNECT BY # parentid = prior persionid connect_by_nocycle => { parentid => 'prior personid' } # adds a connect by statement to the query: # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # CONNECT BY NOCYCLE # parentid = prior persionid start_with Value: \%condition A hashref of conditions which specify the root row(s) of the hierarchy. It uses the same syntax as "search" in DBIx::Class::ResultSet start_with => { firstname => 'Foo', lastname => 'Bar' } # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # START WITH # firstname = 'foo' and lastname = 'bar' # CONNECT BY # parentid = prior persionid order_siblings_by Value: ($order_siblings_by | @order_siblings_by) Which column(s) to order the siblings by. It uses the same syntax as "order_by" in DBIx::Class::ResultSet 'order_siblings_by' => 'firstname ASC' # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # CONNECT BY # parentid = prior persionid # ORDER SIBLINGS BY # firstname ASC AUTHOR
See "AUTHOR" in DBIx::Class and "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2014-01-22 DBIx::Class::Storage::DBI::Oracle::Generic(3)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy