The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sort prasathlogu UNIX for Dummies Questions & Answers 1 10-08-2007 06:56 AM
sort help unics Shell Programming and Scripting 14 04-30-2007 07:28 AM
du -h | sort ? fongthai Shell Programming and Scripting 6 11-02-2006 08:59 PM
How do i sort? abhijeetkul Shell Programming and Scripting 1 12-22-2005 03:49 AM
2nd sort key whatisthis UNIX for Dummies Questions & Answers 1 10-20-2004 10:46 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-04-2007
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 328
need help in sort

i have a program


#!/bin/ksh

echo "enter the id"
read id
echo "enter the name"
read name

if [ "$name" == "rose" ] && [ $id == 1111 ]
then
echo "u r logged in"
echo $name > data.txt
echo $id > data.txt
else

echo "invalid id or name"
fi
--------------------------------------------------------------------

i just want that the file data.txt should not contain any duplicate value.
plz help me in this
it should had only values 1111 rose,no matter how many times i execute the prgm.
also it is not storing the valkue of "rose" in data.txt
thanks in advance

Last edited by ali560045; 12-04-2007 at 05:30 AM..
  #2 (permalink)  
Old 12-04-2007
rikxik's Avatar
rikxik rikxik is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 250
You need to first brush up on shell redirection i.e. a,b,c of shell scripting.
  #3 (permalink)  
Old 12-04-2007
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 328
i got the answer anyway thanks for ur suggestion.................
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0