# replace item..

**URL:** <https://community.unix.com/t/replace-item/175439>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [September 11, 2007, 3:58am UTC](https://community.unix.com/t/replace-item/175439 "2007-09-11T03:58:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![happyv](https://community.unix.com/letter_avatar/happyv/32/5_5575768a8748004e209b776fc1b2916d.png) [@happyv](https://community.unix.com/u/happyv)\
**Post date:** [September 11, 2007, 3:58am UTC](https://community.unix.com/t/replace-item/175439/1 "2007-09-11T03:58:24Z")

</div>

Hello,  
I have the following basic script which is remove the fielld. How can I replace another value in the field? Thx!!

for file in `cat $listn.txt`  
do  
get\_file -q $file  
grep -v '\<customer-id\>13000\</customer-id\>' $file \> $file.grep  
done  
echo All processed file done!!

input file:  
\<customer-id\>13000\</customer-id\>

output file:  
\<customer-id\>2400\</customer-id\>

happyv

---

<div class="post-metadata">

**Author:** ![happyv](https://community.unix.com/letter_avatar/happyv/32/5_5575768a8748004e209b776fc1b2916d.png) [@happyv](https://community.unix.com/u/happyv)\
**Post date:** [September 13, 2007, 1:04am UTC](https://community.unix.com/t/replace-item/175439/2 "2007-09-13T01:04:29Z")

</div>

anyone can help????

---

<div class="post-metadata">

**Author:** ![Ygor](https://community.unix.com/user_avatar/community.unix.com/ygor/32/104_2.png) [@Ygor](https://community.unix.com/u/Ygor)\
**Post date:** [September 14, 2007, 12:09am UTC](https://community.unix.com/t/replace-item/175439/3 "2007-09-14T00:09:42Z")

</div>

Try...

```nohighlight
sed 's!<customer-id>13000</customer-id>!<customer-id>2400</customer-id>!' $file > $file.sed

```
