![]() |
Hello and Welcome from United States 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 |
| shell script to remove old files and write to a log file | yabai | Shell Programming and Scripting | 4 | 12-09-2008 01:08 PM |
| write new line at the beginning of an existing file | sailussr | UNIX for Dummies Questions & Answers | 5 | 11-06-2008 05:42 PM |
| shell script that adds two integers and display answer on screen | wanyac2 | Shell Programming and Scripting | 1 | 07-04-2008 09:37 AM |
| Shell scripting book adds excellent reference to your library - Linux PR (press relea | iBot | UNIX and Linux RSS News | 0 | 07-12-2007 04:40 PM |
| How to write Flat Files by shell script using Oracle Database | coolbuddy | UNIX for Advanced & Expert Users | 3 | 02-21-2006 02:50 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to write shell scrit which adds parameters to existing files
Helo I have one file in that one filed is there
RECLEN: 5 now I want to write a shell script which incresaes the value of RECLEN by 126 as well as I want to write shell script which adds CURPHONER:2:N:Phone used to call a record on which a recall is set PHONECNTR:2:N:Number of attemmpts at calling RECALLNUMBER to the existing files how to write such shell scripts Regards, Amit |
|
||||
|
Quote:
CURPHONER:2:N:Phone used to call a record on which a recall is set PHONECNTR:2:N:Number of attemmpts at calling RECALLNUMBER to the to the existing files file1,file2 in one sort and as well as I want to write a shell script which incresaes the value of RECLEN by 126. e.g. I have two list1.fdict ,list2.fdict when I do in my script echo "CURPHONER:2:N:Phone used to call a record on which a recall is set" >> /opt/avaya/pds/amit/*.fdict I got following error: line 5: /opt/avaya/pds/amit/*.fdict: ambiguous redirect what to do Regards, Amit |
|
||||
|
You can't redirect the line to a selection of files this way. Loop through the files like this:
Code:
for file in /opt/avaya/pds/amit/*.fdict; do echo "CURPHONER:2:N:Phone used to call a record on which a recall is set" >> $"file" done |
|
||||
|
Quote:
Now I want to following lines to .fdict file . also if this line already exist then dont want to add. tell me how to write such effiecient script CURPHONER:2:N:Phone used to call a record on which a recall is set 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 SCNDDATER:10 ![]() ate of second attempt to call RECALLNUMBERSCNDTIMER:8:T:Time of second attempt to call RECALLNUMBER SCNDSTATR:2:C:Stat of second attempt to call RECALLNUMBER THRDDATER:10 ![]() ate of third attempt to call RECALLNUMBERTHRDTIMER:8:T:Time of third attempt to call RECALLNUMBER THRDSTATR:2:C:Stat of third attempt to call RECALLNUMBER FRTHDATER:10 ![]() ate of fourth attempt to call RECALLNUMBERRegards, Amit |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|