Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using "find" and "-exec rm" ... Just no luck :( Post 302348709 by methyl on Saturday 29th of August 2009 08:57:03 AM
Old 08-29-2009
Hi jlliagre. No urban legend. Hands on commercial experience of a very wide range of unix flavours and of their predecessors. Sometimes I only find out oddities when porting tried-and-tested scripts and they misbehave. I don't have "ubuntu" Linux handy though.
One SCO unix came with a standard cron to clean /tmp which failed if there were filenames containing spaces or there were lots of files. Sound familiar?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

find . -path "*_nobackup*" -prune -iname "*.PDF" \( ! -name "*_nobackup.*" \)

These three finds worked as expected: $ find . -iname "*.PDF" $ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \) $ find . -path "*_nobackup*" -prune -iname "*.PDF" They all returned the match: ./folder/file.pdf :b: This find returned no matches: $ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 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.16.2 2005-06-25 Sys::Hostname::Long(3)
All times are GMT -4. The time now is 06:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy