12-14-2007
explanation for "if [ -s $filename ];"
Hi all,
Can any one explain me what the below 'if' statement checking for?
if [ ! -s $filename]; then
do something
fi
Iam aware of the remaining options like -z, -r, -w, -x etc., with 'if' statement, but I dont know about '-s'
.
Thanks in advance,
Mysore 101 Ganapati.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Dummies Questions & Answers
Hi:
How can I remove my own post?
Thanks. (2 Replies)
Discussion started by: phil518
2 Replies
3. UNIX for Dummies Questions & Answers
When I do a listing in one particular directory (ls -al) I get:
total 43456
drwxrwxrwx 2 root root 4096
drwxrwxrwx 3 root root 4096
-rwxrwxr-x 1 nobody nobody 3701594
-rwxrwxr-x 1 nobody nobody 3108510
-rwxrwxr-x 1 nobody nobody 3070580
-rwxrwxr-x 1 nobody nobody 3099733
-rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies
4. Shell Programming and Scripting
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. UNIX for Dummies Questions & Answers
Hi all,
I was wondering why tail -n 2 filename produce an error when I manage to do similar command on head -n 2 filename
SunOS{type8code0}: tail -n 2 filename
usage: tail ]
tail ] (2 Replies)
Discussion started by: type8code0
2 Replies
6. UNIX for Dummies Questions & Answers
Hello Unix experts,
If I could get any explanations on why the code below doesn't work it would be great !
My input looks like that ("|" delimited):
Saaaaabbbbbccccc|ok
Sdddddfffffggggg|ok
The goal is, if $2 is "ok", to remove everything before the pattern given in the match function... (5 Replies)
Discussion started by: lucasvs
5 Replies
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
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
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
LEARN ABOUT HPUX
named-checkzone
named-checkzone(1) General Commands Manual named-checkzone(1)
NAME
named-checkzone - zone validity checking tool
SYNOPSIS
class] mode] mode] outfile] directory] directory] zonename [filename]
DESCRIPTION
is a tool for performing integrity checks on the zone contents. It uses the same integrity checks as the daemon when loading a zone. This
makes useful for checking zone files before configuring them into a name server. Zones and zone files are described in named.conf(4).
Options
Specify the class of the zone.
Dump the zone file in canonical format.
Enable debugging.
Read the journal (if it exists) when loading the zone file.
Perform checks with the specified failure mode. Possible modes are (default), and The option is described in named.conf(4).
Specify whether NS records should be checked to see if they are addresses.
Possible modes are (default), and
Write zone output to
outfile .
Enable quiet mode for exit code only.
Print the version of
and exit.
Change to directory (see chdir(2)) so that relative file names in master file directives work This is similar to the clause in
Operands
filename The file to use for checking the zone contents. The default is the file with the zone name. For the default to work, the file
name for the zone in the statement of the file must be identical to the zone name.
zonename The zone whose contents are to be checked.
RETURN VALUE
sets the exit status to:
Success.
Errors were detected.
EXAMPLES
To perform integrity checks on zone in the zone file and display debug information:
AUTHOR
was developed by the Internet Systems Consortium (ISC).
SEE ALSO
named(1M), chdir(2), named.conf(4).
Requests for Comments (RFC): 1035, available online at
available online at
available from the Internet Systems Consortium at
BIND 9.3 named-checkzone(1)