For grep, the nicest test wrapper is the -q, as it is terse, grep can stop at the first hit and just exit 0 else exit 1 at eof, with no additional interpreting commands like -ge:
I guess even the () can be dropped, as they cost you a fork for a subshell, but I like some wrapper.
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
I have a list of id;
for example: file 1
dfghd
dfghe
dfgey
dfgeu
I have another data file that contain this ids as headers;
for ex. file2
>dfghd
gfdgfddl;klfkld;ld;lgl;dld'l'dv
>dfghe
gkwhjhsgdjdjdjhjddj
>dfgey
jdkjfhdjhfdkjhfdkhkdk
I wanted to compare file 1 and file 2... (1 Reply)
For some reason,
@logs is a list of log files
@filter is a list of expressions to grep out
foreach (@logs){
open READ, "<$_" or die $!;
@temp=<READ>;
close READ;
foreach (@filter){
print grep /$_/,@temp ;
}
}
returns a regex error in one of the files... (4 Replies)
Hello again,
Am having an issue now with getting a simple grep command to work within a function..
The function is as below...
function findRecord() {
output=grep "001" recordDatabase
echo $output
}
At the moment the "001"... (3 Replies)
I'm putting together a script that will search my mail archives for emails that meet certain criteria and output the files to a text file.
I can manually cat that text file and pipe it into sendmail and it will work (i.e. cat /pathtofile/foo.txt | sendmail -t me@company.com)
My script sends... (7 Replies)
I am using a grep command with two patterns in my KSH script. File has line breaks in it and both the patterns are in different lines. Here is the command - grep -l 'RITE AID.*ST.820' natriter820u.20140914
Pattern1 - RITE AID
Pattern2 - ST*820
I am not getting any results from this,... (3 Replies)
Hello
I am using a grep command with two patterns in my KSH script. File has line breaks in it and both the patterns are in different lines. Here is the command grep -l 'RITE AID.*ST.820' natriter820u.20140914
Pattern1 - RITE AID
Pattern2 - ST*820
I am not getting any results from... (24 Replies)
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Hello,
I checked grep help field, I got the answer but seems a bit technical for me.
Could you please let me know what is this script doing?
grep -q -F 'addprestart.sh' /usr/bin/enigma2_pre_start.sh || \
echo '/bin/sh /etc/enigma2/addprestart.sh > \
/dev/null 2>&1 & sleep .5 &' >>... (6 Replies)
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT DEBIAN
game-data-packager
game-data-packager(6) Games Manual game-data-packager(6)NAME
game-data-packager - build a .deb of game data
SYNOPSIS
game-data-packager [ -i ] [ -d out-directory [ -n ] ] game [ game-options ]
DESCRIPTION
Many open-source games require game data which is licensed incompatibly with the Debian Free Software Guidelines. game-data-packager is a
tool designed to help you locally assemble Debian packages containing such game data from CD-ROMs, the Internet or elsewhere.
OPTIONS -i attempt to install the generated Debian package via dpkg(1) and su(1)-d out-directory
writes the generated Debian package to the specified directory.
-n Do not attempt to install the generated Debian package. This option must be used in conjunction with -d.
game The game being packaged. Running game-data-packager without arguments will display a list of valid games. Running game-data-packager
with just the game and no further arguments will display a list of valid options for that game.
SEE ALSO dpkg(1), su(1)AUTHOR
Copyright (C) 2010 Jon Dowland <jmtd@debian.org>
Thanks to Branden Robinson for his 'Write the Fine Manual' presentation, once found at <http://people.debian.org/~branden/talks/wtfm/>
2008-07-14 game-data-packager(6)