09-16-2012
Execution problem
Thanks MJF And Pamu
Pamu : grep xxx file* its working , it will show all the files that have pattern.
But if 3 files are their (z1 ,z2 ,z3) and i have to search the pattern (XXX) from them.
Any advice on this ..
10 More Discussions You Might Find Interesting
1. AIX
Guys,
I am beginer in unix. There is a cobol file with fixed-width. I want to read the total Line, Word and character count. I have tried with wc-l unix command, but it returns '0'.
Please advice me the correct command/steps to get the record count.
Thanks in advance. (4 Replies)
Discussion started by: vibhar
4 Replies
2. Shell Programming and Scripting
Dear All,
I have a script as follows:
1 #! /bin/ksh
2 #
28 varDate=`date +%d%h%y`
29 export spool_file=/app/my_user/work/TH_Status_${varDate}_Check.txt
30
31 #########################
32 # Unix Code Starts here #
33 #########################
... (3 Replies)
Discussion started by: saps19
3 Replies
3. UNIX for Dummies Questions & Answers
Hi
I want to make a script . In this script i want to use input file and this input file consist of three numbers in a line
for example input file is as below:
919876543210 09876543234567876 98764534245678 aircelmms","aircelweb","aircelwap"
096574235625... (2 Replies)
Discussion started by: esumiba
2 Replies
4. UNIX for Dummies Questions & Answers
Hi
i am using expect module and trying to login using following code.
ssh 127.0.0.1
expect "word:"
send "$password \n"
kindly let me know the login script using expect module (1 Reply)
Discussion started by: esumiba
1 Replies
5. UNIX for Dummies Questions & Answers
Hi
i have a file in which there are three fields
code:
919804199233 404911130003916 357266044991350F
and now i want to add two more fields i.e.
code:
919804199233 404911130003916 357266044991350F ms 123
how can i do it using command line
and if have a file of 100... (8 Replies)
Discussion started by: esumiba
8 Replies
6. UNIX for Dummies Questions & Answers
Hi
I am automating my few commands out of which one command is
tail -f running.logs
when i run this command it does not automatically exit and show prompt (#)
what would i do so that it will exit out automatically after few seconds and move to the next command without using
... (4 Replies)
Discussion started by: esumiba
4 Replies
7. UNIX for Dummies Questions & Answers
HI
I am trying to check the status of port using command
/code:
netstat -an | grep port
/Output:
*.2009 *.* 0 0 65535 0 LISTEN
what i am trying to do is
i want to grep only status Wether the port is established/listen if so show ok else... (1 Reply)
Discussion started by: esumiba
1 Replies
8. Shell Programming and Scripting
hi all,
when i tried executing the script by giving following command
$ sh test.sh <parameter>
it shows the following output:
<none>
status code=0
Previously it was working fine.But now its showing this output. (1 Reply)
Discussion started by: sanjay mn
1 Replies
9. Shell Programming and Scripting
Hi,
I have been trying to run a simple script
CONFIG_FILE="/jay/check"
.
.
.
for i in `cat $CONFIG_FILE`
do
loc=`echo $i | cut -d "|" -f2`
var=$(find $loc -mtime -1|wc -l)
if then
echo $loc has files older than 1 day
fi
done
.
.
. (2 Replies)
Discussion started by: jayii
2 Replies
10. Shell Programming and Scripting
I am trying to explore HERE Document in UNIX.
Here is the sample script that i am trying to execute:
#!/bin/sh
filename=sample.txt
vi $filename <<EOF
i
This file was created automatically from
a shell script.
^
Here is the error i received when i execute above script:
Vim: Warning: Input... (3 Replies)
Discussion started by: satty007
3 Replies
LEARN ABOUT OPENDARWIN
merge
MERGE(1) General Commands Manual MERGE(1)
NAME
merge - three-way file merge
SYNOPSIS
merge [ options ] file1 file2 file3
DESCRIPTION
merge incorporates all changes that lead from file2 to file3 into file1. The result ordinarily goes into file1. merge is useful for com-
bining separate changes to an original. Suppose file2 is the original, and both file1 and file3 are modifications of file2. Then merge
combines both changes.
A conflict occurs if both file1 and file3 have changes in a common segment of lines. If a conflict is found, merge normally outputs a
warning and brackets the conflict with <<<<<<< and >>>>>>> lines. A typical conflict will look like this:
<<<<<<< file A
lines in file A
=======
lines in file B
>>>>>>> file B
If there are conflicts, the user should edit the result and delete one of the alternatives.
OPTIONS
-A Output conflicts using the -A style of diff3(1), if supported by diff3. This merges all changes leading from file2 to file3 into
file1, and generates the most verbose output.
-E, -e These options specify conflict styles that generate less information than -A. See diff3(1) for details. The default is -E. With
-e, merge does not warn about conflicts.
-L label
This option may be given up to three times, and specifies labels to be used in place of the corresponding file names in conflict
reports. That is, merge -L x -L y -L z a b c generates output that looks like it came from files x, y and z instead of from files
a, b and c.
-p Send results to standard output instead of overwriting file1.
-q Quiet; do not warn about conflicts. -V Print 's version number.
DIAGNOSTICS
Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
IDENTIFICATION
Author: Walter F. Tichy.
Manual Page Revision: 1.1.1.1; Release Date: 2002/04/30.
Copyright (C) 1982, 1988, 1989 Walter F. Tichy.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
SEE ALSO
diff3(1), diff(1), rcsmerge(1), co(1).
BUGS
It normally does not make sense to merge binary files as if they were text, but merge tries to do it anyway.
GNU
2002/04/30 MERGE(1)