Sponsored Content
Top Forums Shell Programming and Scripting newbie shellscript tryout help. Post 302186682 by cstudent on Thursday 17th of April 2008 09:23:51 PM
Old 04-17-2008
i did delete the spaces but it still says command Add is not found Smilie

Code:
#!/bin/bash
#-c

#count = 0
for userName in `awk -F":" '{print $3}' passwd`
do
        while [ $userName -gt 500 ]
        do
#               echo $userName
                $count=`expr $count + 1`
                echo "Add $count"
        done
done

 

9 More Discussions You Might Find Interesting

1. Programming

Shellscript for MQSeries

Iam new to shellscript. 1)How to strart QUERYMANAGER using shellscript. 2)How to put and get messages in MQSeries using shellscripts. 3)iam using local queues . Thanks lot. (0 Replies)
Discussion started by: ram2s2001
0 Replies

2. UNIX for Advanced & Expert Users

shellscript problem

hI, Pls consider the following shell script #!/bin/csh -f sqlplus tkyte/tkyte <<"EOF" > tmp.csh set serveroutput on declare a number:=5; begin dbms_output.put_line( 'a:='||a ); end; / spool off "EOF" The above script does the followin 1)it connects... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies

3. Shell Programming and Scripting

Need help with shellscript

Hello. I am a novince at writing shell scripts but here is the question. I have to write a shell script that does the following: Once executed via crontab, the script should do the following: a. get date/time stamp in for format 10-MAR-05 and b. execute shell script my_script.sh (which... (2 Replies)
Discussion started by: jigarlakhani
2 Replies

4. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

5. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

6. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies

7. Shell Programming and Scripting

Automation of UI using shellscript

Hi, I want to do automation on UI using shellscript. eg: 1) Drop down menu contains assign , investigate, closed. now there is one id want assign it using assign tab then need to investigate it and lastly close. Sometimes the id can't assign to perticular user. there are so many... (11 Replies)
Discussion started by: aish11
11 Replies

8. Shell Programming and Scripting

Help with shellscript

I am new in shell script i want to convert .txt file in the format axsjdijdjjdk to a x s j d i j d j j d k (5 Replies)
Discussion started by: sreejithalokkan
5 Replies

9. Shell Programming and Scripting

Telnet shellscript

cat << EOF | telnet alt1.aspmx.l.google.com 25 HELO verify-email.org MAIL FROM: <check@verify-email.org> RCPT TO: <test@gmail.com> quit EOF Hello, I'm trying to get the result of that execution, and can not see the result or bring it to a txt ... the direct command in ssh running the result... (5 Replies)
Discussion started by: c0i0t3
5 Replies
atuser(3)						       AtFS Toolkit Library							 atuser(3)

NAME
atUserValid, atScanUser, atUserName, atUserUid - user handling SYNOPSIS
#include <atfs.h> #include <atfstk.h> void atScanUser (char *userName; Af_user *resultUser); char* atUserName (Af_user *user); Uid_t atUserUid (Af_user *user); int atUserValid (Af_user *user); DESCRIPTION
atScanUser scans the given string userName and tries to derive an AtFS user identification (resultUser) from it. It does not verify the existence of a corresponding UNIX (/etc/passwd) user entry. Use atUserUid to test that. atScanUser understands the following formats: user When the string does not contain an at sign, it is considered to be a plain user name from the current host and domain. user@host In the case that the part after the at sign doe not contain a period, it is assumed to be a hostname. Domain is the current domain. user@host.domain This format can only be recognized, when the given domain is equal to the current domain, and the hostname remains as rest between the at sign and domain name. user@domain An user identification string with a domain name different to the local domain is treated as user@domain, although this might be wrong. atUserName returns a string of the form user@domain generated from the given user structure. If no domain name is given in the structure, it returns user@host instead. With no host and no domain name, just user is returned. The result string resides in static memory and will be overwritten on subsequent calls. atUserUid tries to map the given user structure to a UNIX user identification. It returns the uid on success, -1 otherwise. atUserValid checks the given user structure for plausibility. It returns FALSE on fauilure, a non null value on success. AtFStk-1.12 Fri Jun 25 16:39:50 1993 atuser(3)
All times are GMT -4. The time now is 08:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy