# Shell Parameter...

**URL:** <https://community.unix.com/t/shell-parameter/178611>\
**Category:** Shell Programming and Scripting\
**Created:** [December 6, 2007, 4:38am UTC](https://community.unix.com/t/shell-parameter/178611 "2007-12-06T04:38:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marconi](https://community.unix.com/letter_avatar/marconi/32/6_22734026db12803ebb3e059622ac3534.png) [@marconi](https://community.unix.com/u/marconi)\
**Post date:** [December 6, 2007, 4:38am UTC](https://community.unix.com/t/shell-parameter/178611/1 "2007-12-06T04:38:54Z")

</div>

I am trying to get the value of the user id (uid), which is the shell parameter.Then, read the /etc/passwd and keep the lines where the uid is superior to the parameter and write this line in a new file. But I am not getting what I wanted. Perhaps there is a problem with the Syntax below :-

#!/usr/bin/ksh  
uid=${uid:-/etc/passwd}  
/etc/passwd/read  
$ cut -d: -f1 \< uid gt $$

Can anyone help me, please.

Thanks,  
Marconi.

---

<div class="post-metadata">

**Author:** ![Yogesh\_Sawant](https://community.unix.com/user_avatar/community.unix.com/yogesh_sawant/32/22562_2.png) [@Yogesh\_Sawant](https://community.unix.com/u/Yogesh_Sawant)\
**Post date:** [December 7, 2007, 12:53am UTC](https://community.unix.com/t/shell-parameter/178611/2 "2007-12-07T00:53:31Z")

</div>

is this what you are trying to do?

```nohighlight
grep $UID /etc/passwd

```
