Hi,
I have a script which will check the fiel existence, the lines are as below
if !(test -d ./data) then
mkdir data
fi
In the first line error occurs as below
generatelicense.sh: syntax error at line 2: `!' unexpected
Where as this script works fine in linux OS.
How to solve... (2 Replies)
Hi everybody,
I need to check in C program wether a given login is known on the system. Is there any system function that could do this ?
So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (10 Replies)
i can able to transfer a file from build server(AIX)to webserver using ksh through ftp.my query is to check the existence of file while transfering from one server to other .i.e i need some command or script that checks the existence of file with same name in both server,within ftp syntax.
... (1 Reply)
we have tranferred an ear from local server to remote server using ftp.consider, we have an ear file named a.ear in remote server,again if we transfer the same file named a.ear from local server to remote server.we need the kshell to check the existence of the ear file in remote server,and if the... (3 Replies)
Hello
I am having a requirement like if there is no file in the directory then i need a message to pop on after the execution of the script.
My script basically does for File in `ls -t $DIRECTORY | tail -1`;
if there is no file the DIRECTORY then the script is simply exiting with out... (2 Replies)
I have requirement where i need to search for files which start with SALESORDER and PURCHASEORDER. i need to process the files with SALESORDER first and then PURCHASEORDER. If SALESORDER files are not there i dont want to process PURCHASEORDER and i want to come out of script. I have written a code... (4 Replies)
Hi All,
I have shell script and I need to check if some directory exist.
I'm don't have the information if that directory is written in upper case or lowcase or mixed.
Is there anyway to check the existence of that directory by ignoring
case senestive?
Thanks (3 Replies)
Hi all,
I need a batch script to Check for existence of file say i check for files with extension xml.done in C:\Myfile.(This folder contains .xml file and its corresponding .done files)
If the .done file exists then it should FTP the corresponding .xml file to UNIX.
Is this possible to do... (6 Replies)
Hi
I have a requirement to check whether the files exists, then it will call other steps in shell script.
I did
ls *.csv|wc -l
if
then checking the count of the files should be more than 1 then it will call other steps.
I am getting the error that too many arguements as there n... (13 Replies)
Discussion started by: cnrj
13 Replies
LEARN ABOUT SUSE
grepdiff
GREPDIFF(1) Man pages GREPDIFF(1)NAME
grepdiff - show files modified by a diff containing a regex
SYNOPSIS
grepdiff [[-n] | [--line-number]] [--number-files] [[-p n] | [--strip-match=n]] [--strip=n] [--addprefix=PREFIX] [[-s] | [--status]]
[[-i PATTERN] | [--include=PATTERN]] [[-x PATTERN] | [--exclude=PATTERN]] [[-v] | [--verbose]] [[-E] | [--extended-regexp]] [[-H]
| [--with-filename]] [[-h] | [--no-filename]] [--output-matching=WHAT] {[REGEX] | [-f FILE]} [file...]
grepdiff {[--help] | [--version] | [--list] | [--filter ...]}
DESCRIPTION
For each file modified by a patch, if the patch hunk contains the REGEX then the file's name is printed.
The regular expression is treated as POSIX Basic Regular Expression syntax, unless the -E option is given in which case POSIX Extended
Regular Expression syntax is used.
For example, to see the patches in my.patch which contain the regular expression "pf_gfp_mask", use:
grepdiff pf_gfp_mask my.patch |
xargs -rn1 filterdiff my.patch -i
You can use both unified and context format diffs with this program.
OPTIONS -n, --line-number
Display the line number that each patch begins at. If verbose output is requested, each matching hunk is listed as well.
For a description of the output format see lsdiff(1).
--number-files
File numbers are listed, beginning at 1, before each filename.
-p n, --strip-match=n
When matching, ignore the first n components of the pathname.
--strip=n
Remove the first n components of the pathname before displaying it.
--addprefix=PREFIX
Prefix the pathname with PREFIX before displaying it.
-s
Show file additions, modifications and removals. A file addition is indicated by a "+", a removal by a "-", and a modification by a
"!".
-i PATTERN, --include=PATTERN
Include only files matching PATTERN.
-x PATTERN --exclude=PATTERN
Exclude files matching PATTERN.
-E, --extended-regexp
Use POSIX Extended Regular Expression syntax.
-H, --with-filename
Print the name of the patch file containing each match.
-h, --no-filename
Suppress the name of the patch file containing each match.
-f FILE, --file=FILE
Read regular expressions from FILE, one per line.
--output-matching=hunk|file
Display the matching hunk-level or file-level diffs.
--help
Display a short usage message.
--version
Display the version number of grepdiff.
--filter
Behave like filterdiff(1) instead.
--list
Behave like lsdiff(1) instead.
SEE ALSO filterdiff(1), lsdiff(1)AUTHOR
Tim Waugh <twaugh@redhat.com>
Package maintainer
patchutils 23 Jan 2009 GREPDIFF(1)