Sponsored Content
Top Forums Shell Programming and Scripting Touch file inside directory referenced by wild card. Post 303045770 by jim mcnamara on Sunday 12th of April 2020 06:08:53 PM
Old 04-12-2020
I cannot test this on AIX; works on Linux and Solaris:
Code:
find . -name '/[Oo]racle/mymac' -exec touch {} \;

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using if with wild card patterns

Hi, Please help me. Suppose I have a file which contains files like: My file :/tmp/rooh_20020518.lst it consists: ASI00320225041925URD01 ASI00320225041925KER02 ASI00390228095244KER08 ... (1 Reply)
Discussion started by: rooh
1 Replies

2. UNIX for Dummies Questions & Answers

ls and wild card - Should be simple!

I am trying to cp files that have F0 as prefix in their name in path p1/p2 to path p3/p4 this command does not work - Why? (I am using HP/UX) cp p1/p2/F0* p3/p4 thanks. (2 Replies)
Discussion started by: GNMIKE
2 Replies

3. Shell Programming and Scripting

Wild card in find perm

Hi, Is there a way to use find command to list the directories for certain permissions. I know we can use find . -type d -perm nnn, where nnn is the permission number . However I wold like to know if I wanna search for wild card permissions i.e 75* / 7* / 55* , as i do not know the actual... (1 Reply)
Discussion started by: braindrain
1 Replies

4. AIX

df, grep, wild card

Hi, I want to monitor my filesystem capacity and I want to df with grep wildcard for all 9*%. Is this possible? I want to replaced all the existing complicated scripts I have in the system. Thanks, Itik (2 Replies)
Discussion started by: itik
2 Replies

5. Shell Programming and Scripting

Find Existence of File with wild card using Csh

Hi All, I would like to find out the existence of files with wild card using CSH. I have used the below code but does not seem to work. Can any expert give me some advice ? set nonomatch set pattern = "_xxx" set filetype = ( *$pattern* ) if ( -e $filetype) then echo... (2 Replies)
Discussion started by: Raynon
2 Replies

6. Shell Programming and Scripting

wild card in if condition not working

Hi, I am using RHEL5. I have following if condition. if In the above condition, if the value of a contains word WARNING, it should match. i.e., WARNING_MESSAGE, CRITICAL WARNING, WARNING ALERT etc. it should match. For b, alert error, ALERT ERROR, ERROR IMMEDIATE ACTION REQUIRED, etc... (2 Replies)
Discussion started by: user7509
2 Replies

7. Shell Programming and Scripting

Grep using wild card issue

Hi, I am having a file (file1) having following contents " xet B - All Divers/All Rivers - - ns - " Now when i use cat file1 | grep 'RF' it doesn't returns anything. But on using cat file1 | grep 'RF*' shows me... (6 Replies)
Discussion started by: sarbjit
6 Replies

8. Shell Programming and Scripting

find with wild card [solved]

Can somebody help me with the following syntax? I want to find all files that end with *.arc SUFFIX=".arc" find /tmp -name "\*$SUFFIX" -print 2>/dev/null ---------- Post updated at 03:45 PM ---------- Previous update was at 03:41 PM ---------- got it thanks -name... (0 Replies)
Discussion started by: BeefStu
0 Replies

9. Shell Programming and Scripting

Bash looking in different directory for file that isn't referenced in command

When I run the below bash I get the expected output, which is the sum of all matching targets less than 20 in $file1. The filename in the directory is fixed (in bold). for file1 in /home/cmccabe/Desktop/test/panel/reads/16-0000_EPIL70.txt ; do bname=`basename $file1` ... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. UNIX for Advanced & Expert Users

Find wild card directory and its files of some extensions

I want to use Find command to find directories that have certain name and them find files in that directory having only some extensions. So far, I have come up with this command to list directories with wild card name and list ALL the files in that directory. find . -type d -name prog\* -print... (11 Replies)
Discussion started by: sssccc
11 Replies
Sys::Hostname::Long(3)					User Contributed Perl Documentation				    Sys::Hostname::Long(3)

NAME
Sys::Hostname::Long - Try every conceivable way to get full hostname SYNOPSIS
use Sys::Hostname::Long; $host_long = hostname_long; DESCRIPTION
How to get the host full name in perl on multiple operating systems (mac, windows, unix* etc) DISCUSSION
This is the SECOND release of this code. It has an improved set of tests and improved interfaces - but it is still often failing to get a full host name. This of course is the reason I wrote the module, it is difficult to get full host names accurately on each system. On some systems (eg: Linux) it is dependent on the order of the entries in /etc/hosts. To make it easier to test I have testall.pl to generate an output list of all methods. Thus even if the logic is incorrect, it may be possible to get the full name. Attempt via many methods to get the systems full name. The Sys::Hostname class is the best and standard way to get the system hostname. However it is missing the long hostname. Special thanks to David Sundstrom and Greg Bacon for the original Sys::Hostname SUPPORT
This is the original list of platforms tested. MacOS Macintosh Classic OK Win32 MS Windows (95,98,nt,2000...) 98 OK MacOS X Macintosh 10 OK (other darwin) Probably OK (not tested) Linux Linux UNIX OS OK Sparc OK HPUX H.P. Unix 10? Not Tested Solaris SUN Solaris 7? OK (now) Irix SGI Irix 5? Not Tested FreeBSD FreeBSD OK A new list has now been compiled of all the operating systems so that I can individually keep informaiton on their success. THIS IS IN NEED OF AN UPDATE AFTER NEXT RELEASE. Acorn - Not yet tested AIX - Not yet tested Amiga - Not yet tested Atari - Not yet tested AtheOS - Not yet tested BeOS - Not yet tested BSD - Not yet tested BSD/OS - Not yet tested Compaq - Not yet tested Cygwin - Not yet tested Concurrent - Not yet tested DG/UX - Not yet tested Digital - Not yet tested DEC OSF/1 - Not yet tested Digital UNIX - Not yet tested DYNIX/ptx - Not yet tested EPOC - Not yet tested FreeBSD - Not yet tested Fujitsu-Siemens - Not yet tested Guardian - Not yet tested HP - Not yet tested HP-UX - Not yet tested IBM - Not yet tested IRIX - Not yet tested - 3rd hand information might be ok. Japanese - Not yet tested JPerl - Not yet tested Linux Debian - Not yet tested Gentoo - Not yet tested Mandrake - Not yet tested Red Hat- Not yet tested Slackware - Not yet tested SuSe - Not yet tested Yellowdog - Not yet tested LynxOS - Not yet tested Mac OS - Not yet tested Mac OS X - OK 20040315 (v1.1) MachTen - Not yet tested Minix - Not yet tested MinGW - Not yet tested MiNT - Not yet tested MPE/iX - Not yet tested MS-DOS - Not yet tested MVS - Not yet tested NetBSD - Not yet tested NetWare - Not yet tested NEWS-OS - Not yet tested NextStep - Not yet tested Novell - Not yet tested NonStop - Not yet tested NonStop-UX - Not yet tested OpenBSD - Not yet tested ODT - Not yet tested OpenVMS - Not yet tested Open UNIX - Not yet tested OS/2 - Not yet tested OS/390 - Not yet tested OS/400 - Not yet tested OSF/1 - Not yet tested OSR - Not yet tested Plan 9 - Not yet tested Pocket PC - Not yet tested PowerMAX - Not yet tested Psion - Not yet tested QNX 4 - Not yet tested 6 (Neutrino) - Not yet tested Reliant UNIX - Not yet tested RISCOS - Not yet tested SCO - Not yet tested SGI - Not yet tested Symbian - Not yet tested Sequent - Not yet tested Siemens - Not yet tested SINIX - Not yet tested Solaris - Not yet tested SONY - Not yet tested Sun - Not yet tested Stratus - Not yet tested Tandem - Not yet tested Tru64 - Not yet tested Ultrix - Not yet tested UNIX - Not yet tested U/WIN - Not yet tested Unixware - Not yet tested VMS - Not yet tested VOS - Not yet tested Windows CE - Not yet tested 3.1 - Not yet tested 95 - Not yet tested 98 - Not yet tested Me - Not yet tested NT - Not yet tested 2000 - Not yet tested XP - Not yet tested z/OS - Not yet tested KNOWN LIMITATIONS
Unix Most unix systems have trouble working out the fully quallified domain name as it to be configured somewhere in the system correctly. For example in most linux systems (debian, ?) the fully qualified name should be the first entry next to the ip number in /etc/hosts 192.168.0.1 fred.somwhere.special fred If it is the other way around, it will fail. Mac TODO
Contributions David Dick Graeme Hart Piotr Klaban * Extra code from G * Dispatch table * List of all operating systems. Solaris * Fall back 2 - TCP with DNS works ok * Also can read /etc/defaultdomain file SEE ALSO
L<Sys::Hostname> AUTHOR
Scott Penrose <scottp@dd.com.au> COPYRIGHT
Copyright (c) 2001,2004,2005 Scott Penrose. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.1 2005-06-25 Sys::Hostname::Long(3)
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy