![]() |
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Problem with shell script | Muki101 | Shell Programming and Scripting | 2 | 11-04-2008 05:29 PM |
| Problem in shell script | arnie_nits | Shell Programming and Scripting | 1 | 12-12-2007 10:13 AM |
| shell script problem | djt0506 | UNIX for Dummies Questions & Answers | 2 | 12-07-2005 11:29 PM |
| Problem with shell script | zylwyz | Shell Programming and Scripting | 2 | 06-29-2005 02:01 PM |
| shell script problem | jayaram_miryabb | Shell Programming and Scripting | 1 | 03-09-2005 06:38 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
shell script problem
I have one file list.fdict which contains recordname and its details.
like : NAME1:25:C:NAME LINE1: NAME2:25:C:NAME LINE2: CITY:25:C:City: STATE:2:C:State: ZIPCODE:5:N:ZIPCODE: PHONE1:12:C:HOME PHONE: PHONE2:12:C:BUSINESS PHONE: I want to append news records(22 different records line) to the above file. for this, I want to write shell script which first check record exists then dont append and if not exists then append it. How do you I write such shell script in efficient way. Regards, Amit |
|
||||
|
Quote:
suppose I have two files list1.cfg and list2.cfg both files contains differentrecords details like List1.cfg NAME1:25:C:NAME LINE1: NAME2:25:C:NAME LINE2: CITY:25:C:City: STATE:2:C:State: ZIPCODE:5:N:ZIPCODE: PHONE1:12:C:HOME PHONE: PHONE2:12:C:BUSINESS PHONE: list2.cfg NAME1:25:C:NAME LINE1: NAME2:25:C:NAME LINE2: PHONECNTR:2:N:Number of attemmpts at calling RECALLNUMBER PHONESTATR:1:C:PHONESTAT of the current RECALLNUMBER ZONEPHONER:1:C:Time zone of the current RECALLNUMBER LASTDATER:10 ![]() ate of last attempt on RECALLNUMBERLASTTIMER:8:T:Time of last attempt on RECALLNUMBER LASTSTATR:2:C:Stat of last attempt on RECALLNUMBER FRSTDATER:10 ![]() ate of first attempt to call RECALLNUMBERFRSTTIMER:8:T:Time of first attempt to call RECALLNUMBER FRSTSTATR:2:C:Stat of first attempt to call RECALLNUMBER Now I want to append contents list2.cfg to list1.cfg(It ispposible using cat list2.cfg >>list1.cfg) but I want to check if content of (record) in list2.cfg is present in list1.cfg then dont append it otherwise append it. How do I write such shell script in efficient way Regards, Amit |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|