12-07-2004
$ echo "ex_pr_1212.log.Z" | grep ".Z$"
ex_pr_1212.log.Z
$ echo $?
0
$ echo "ex_pr_1212.log" | grep ".Z$"
$ echo $?
1
$
5 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i have couple of my assignment questions
What command results in adding today's date and time to the file yesterday.txt
What command results in creation of a new file named yesterday.txt that contains yesterday's date but no time (3 Replies)
Discussion started by: doomed47
3 Replies
2. Shell Programming and Scripting
Hello...
Im trying to use "- " as field separator...
I used awk -F"- " '{print $3}' input_file ... but it's not working, it assumes that the field separator is "-" and not "- " ...
Any ideas ?? :(
Thanks (6 Replies)
Discussion started by: yahyaaa
6 Replies
3. UNIX for Dummies Questions & Answers
hy guys
I got a ques
I cant acess root, i tried to fsck it, but gets errors to read file systems. What steps do you take to recover the host before you see if there is any data corruption on the root drive?
Regards
Charneet (1 Reply)
Discussion started by: charneet
1 Replies
4. UNIX for Dummies Questions & Answers
hi,
Can someone tell me what commands do you use to start service back upin solaris ?
Regards
Charneet (1 Reply)
Discussion started by: charneet
1 Replies
5. UNIX for Advanced & Expert Users
hello guys!! need 1 favour from u all..
Can u jst tell me the answers for these ques??
1. ls - l _____ : command to return all files that end with single digit and those with TXT extension
2. ls -l report* _______ : command to return all files that start with the word RPT except those with LOG... (1 Reply)
Discussion started by: Gan_7
1 Replies
LEARN ABOUT FREEBSD
atf-sh
ATF-SH(1) BSD General Commands Manual ATF-SH(1)
NAME
atf-sh [-s shell] -- interpreter for shell-based test programs
SYNOPSIS
atf-sh script
DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library.
atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter-
preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not
use any non-standard extensions.
The following options are available:
-s shell Specifies the shell to use instead of the value provided by ATF_SHELL.
ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes.
ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes.
ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a
specific interpreter.
EXAMPLES
Scripts using atf-sh(3) should start with:
#! /usr/bin/env atf-sh
Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode
the path to atf-sh in the script and then use the -s option afterwards as a single parameter:
#! /path/to/bin/atf-sh -s/bin/bash
ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts.
SEE ALSO
atf-sh(3)
BSD
September 27, 2014 BSD