HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: help on scripting
Operating System - HP-UX
1828221
Members
2096
Online
109975
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
01-09-2005 11:58 AM
01-09-2005 11:58 AM
help on scripting
Below is a function within a script
for FILE in `find $CDCFG -name PROD"*"cfg -exec grep -il file {} \;`
do
cat $FILE > /tmp/$(basename $FILE).tmp
done
I want to list $FILE which contains 3 files and give the user an option to display the required file.
can anyone give me a few idea's.
cheers
for FILE in `find $CDCFG -name PROD"*"cfg -exec grep -il file {} \;`
do
cat $FILE > /tmp/$(basename $FILE).tmp
done
I want to list $FILE which contains 3 files and give the user an option to display the required file.
can anyone give me a few idea's.
cheers
hello
- Tags:
- grep
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 01:11 PM
01-09-2005 01:11 PM
Re: help on scripting
If I understand the question correctly, then try
this:
FILELIST=`find $CDCFG -name PROD"*"cfg -exec grep -il file {} \;`
echo "Enter the filename (options are $FILELIST)"
read FILE
cat $FILE > /tmp/basename $FILE.tmp
- Biswajit
this:
FILELIST=`find $CDCFG -name PROD"*"cfg -exec grep -il file {} \;`
echo "Enter the filename (options are $FILELIST)"
read FILE
cat $FILE > /tmp/basename $FILE.tmp
- Biswajit
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2005 01:18 PM
01-09-2005 01:18 PM
Re: help on scripting
Thanks but not what i was looking for.
I want to list the files which are found then choose to cat the relevant file.
I want to list the files which are found then choose to cat the relevant file.
hello
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP