The UNIX and Linux Forums  

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 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 03:56 AM
sort help unics Shell Programming and Scripting 14 04-30-2007 04:28 AM
du -h | sort ? fongthai Shell Programming and Scripting 6 11-02-2006 05:59 PM
How do i sort? abhijeetkul Shell Programming and Scripting 1 12-22-2005 12:49 AM
2nd sort key whatisthis UNIX for Dummies Questions & Answers 1 10-20-2004 07:46 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-04-2007
ali560045's Avatar
Registered User
 

Join Date: Oct 2007
Posts: 265
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 02:30 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 12-04-2007
rikxik's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 105
You need to first brush up on shell redirection i.e. a,b,c of shell scripting.
Reply With Quote
  #3  
Old 12-04-2007
ali560045's Avatar
Registered User
 

Join Date: Oct 2007
Posts: 265
i got the answer anyway thanks for ur suggestion.................
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0