The inode thing is exactly what I've always done in this situtation. But I just thought I'd have a play about and see if I could find another answer, and there's this approach too (which might be handier if you need to script this on a regular basis, for some really weird reason).
On up-to-date Bash on modern Linux, you can use a regex like this:
[^[:print:]]
to match non-printable characters only. I created a file with the same name as yours, and some other besides, and here's a sample session showing that regex in action.
So if you absolutely needed to automate the removal of such things, this might be a useful approach if your shell and/or distro support it.
I want to replace a string which contains "/" in vi but what is the escape character for forward slash?
e.g. I have a text file with the contents below and I want to replace "/Top/Sub/Sub1" with "ABC".
/Top/Sub/Sub1
The replace command I am using is ... (4 Replies)
Hi
I'm trying to split a dir listing
eg
/home/foo1/foo2
I'm using ksh
I've tried
dir=/home/foo1/foo2
splitit=`echo $dir | awk -F '\/' '{print $1}'`
echo $splitit
nothing is output!
I have checked the escape character. The only one I have found is \
BTW `pwd` | awk -F \/... (8 Replies)
Hi ,
I want to change space to ' in my script.
I tried doing this,
sed 's/ /\'/g' filename
but i could not get it.
can some one help me please.
Thanks,
Deepak (4 Replies)
Hello,
I wanted to display command with echo like this in tcsh.
output should be "//'test.test1.test2'"
(" at both ends also required in output)
Please help me. (1 Reply)
Hi All,
How do i write in sed for the 6th and 7th field of etc/passwd file as it involves "/" character?
Does mine below is correct? It's incomplete script as i need help with syntax as i always getting may errors :(
Example of etc/passwd file:
blah:x:1055:600:blah... (6 Replies)
All ,
i have input line as below .
abc\ , ewioweioi \,
and want the output as below removing the "\"
abc , ewioweioi ,
could anyone help me out (2 Replies)
i have string as below
str=".<date>"
in which i need to replace < with /< , when i tried with sed , got the output.
--> echo $str | sed 's/</\\</g'
.\<date>
when i tried to assign it to a variable , i am not getting the same
--> a=`echo $str | sed 's/</\\</g'` ; echo $a... (4 Replies)
friends,
I have a situation where i am using a $RANDOM function along with the filename, I want this to be escaped by the OS in the first assignment (works as expected) and executed in the second assignment (does not execute $RANDOM)
filename1=filename1_\$RANDOM
echo $filename1... (3 Replies)
Hi ,
I am looking for a function which will do the following.
1. I have a variable which will hold few special chracter like
SPECIAL_CHARS="& ;"2. I have an escape character.
ESCAPE_CHAR="\"3. Now when I passed some string in the function it will return the same string but now it will... (8 Replies)
Discussion started by: Anupam_Halder
8 Replies
LEARN ABOUT V7
named-checkconf
named-checkconf(1M) System Administration Commands named-checkconf(1M)NAME
named-checkconf - named configuration file syntax checking tool
SYNOPSIS
named-checkconf [-v] [-t directory] filename
DESCRIPTION
The named-checkconf utility checks the syntax, but not the semantics, of a named configuration file.
OPTIONS
The following options are supported:
-t directory Change the root directory to directory so that include directives in the configuration file are processed as if run by a
named configuration whose root directory has been similarly changed.
-v Print the version of the named-checkconf program and exit.
OPERANDS
The following operands are supported:
filename The name of the configuration file to be checked. If not specified, it defaults to /etc/named.conf.
EXIT STATUS
0 No errors were detected.
1 An error was detected.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWbind9 |
|Interface Stability |External |
+-----------------------------+-----------------------------+
SEE ALSO named(1M), named.conf(4), attributes(5)
BIND 9 Administrator Reference Manual
NOTES
Source for BIND9 is available in the SUNWbind9S package.
SunOS 5.10 15 Dec 2004 named-checkconf(1M)