- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Replace
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 05:37 AM
12-15-2003 05:37 AM
I use a common environmental variable (PROCESS_DT) in all of them. Now i need to change it as PROCESS_DATE. Is there any way i can change in all scripts all at once ?
Thanks
Raj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 05:46 AM
12-15-2003 05:46 AM
Re: Replace
I dont have a server to check it on but this should create a backup of your file first and then do the replace.
Test it on a few files in a test environment first.
find . -type f -print | xargs perl -i.bak -p -e 's#/PROCESS_DT/#PROCESS_DATE#g'
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 05:48 AM
12-15-2003 05:48 AM
Re: Replace
#!/usr/bin/ksh
find . -type f -depth | while read FILE
do
sed "s/PROCESS_DT/PROCESS_DATE/g" < ${FILE} > ${FILE}.shiju
mv ${FILE}.shiju $FILE
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 05:55 AM
12-15-2003 05:55 AM
Re: Replace
Usage:
mv [-f] [-i] [-e warn|force|ignore] f1 f2
mv [-f] [-i] [-e warn|force|ignore] f1 ... fn d1
mv [-f] [-i] [-e warn|force|ignore] d1 d2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 06:11 AM
12-15-2003 06:11 AM
Re: Replace
use mv -f
Paula