- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- C-shell, suppressing output of "find: cannot open
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
Discussions
Forums
Forums
Discussions
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
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
тАО11-07-2000 01:41 AM
тАО11-07-2000 01:41 AM
C-shell, suppressing output of "find: cannot open
Is it possible to suppress the output
find: cannot open ... if there is a directory for which the user has no rights.
Error message is confusing users, altought it
is not relevant for the shell (works OK)
Best regards
Bettina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 01:49 AM
тАО11-07-2000 01:49 AM
Re: C-shell, suppressing output of "find: cannot open
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 01:50 AM
тАО11-07-2000 01:50 AM
Re: C-shell, suppressing output of "find: cannot open
You can achieve what you want by using following construction:
(program > /dev/tty ) >& stderr_file
stdout will go to the tty, stderr will go to the file stdeerr_file.
Hope this helps,
Rik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 01:52 AM
тАО11-07-2000 01:52 AM
Re: C-shell, suppressing output of "find: cannot open
Allan's solution also puts stdout into the file.
Bye,
Rik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 01:53 AM
тАО11-07-2000 01:53 AM
Re: C-shell, suppressing output of "find: cannot open
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 02:18 AM
тАО11-07-2000 02:18 AM
Re: C-shell, suppressing output of "find: cannot open
construction is
set liste = `find ....`
If I use >dev/tty liste is empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 02:28 AM
тАО11-07-2000 02:28 AM
Re: C-shell, suppressing output of "find: cannot open
This example should do the trick:
set liste=`find /etc -name "*.conf" |& grep -v "^find:"`
|& redirects stderr with stdout, in this case into the pipe
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 02:38 AM
тАО11-07-2000 02:38 AM
Re: C-shell, suppressing output of "find: cannot open
set liste=`/sbin/sh -c "find ... 2>/dev/null"`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 06:42 AM
тАО11-07-2000 06:42 AM
Re: C-shell, suppressing output of "find: cannot open
think it is:
set nonomatch
Perhaps setting this in your script befor the find command it supresses this messages.
don't know if this works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 09:56 AM
тАО11-07-2000 09:56 AM
Re: C-shell, suppressing output of "find: cannot open
find
the 2 says errors only
>/dev/null says output to the null device.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 09:56 AM
тАО11-07-2000 09:56 AM
Re: C-shell, suppressing output of "find: cannot open
find
the 2 says errors only
>/dev/null says output to the null device.
Hope this helps.