I tried both the suggestion on my windows unix cygwin but the command does not yield any result.
Code:
awk '/^#/ {next} NR==FNR {app_prd[$0]=$0;next} {if ($0 in app_prd) { delete app_prd[$0] } else {print }}; END {for (i in app_prd) print app_prd[i]}' app_prd.properties app_dr.properties
awk '/^#/ {next} FNR==NR {app_prd[$0];next} !($0 in app_prd)' app_prd.properties app_dr.properties
$ uname -a
CYGWIN_NT-6.1-WOW64 IUCLP01858 1.7.29(0.272/5/3) 2014-04-07 13:44 i686 Cygwin
The filenames i am trying to compare are app_prd.properties and app_dr.properties.
While on my unix the command fails with the below output.
Code:
$ awk '/^#/ {next} NR==FNR {app_prd[$0]=$0;next} {if ($0 in app_prd) { delete app_prd[$0] } else {print }}; END {for (i in app_prd) print app_prd[i]}' app_prd.properties app_dr.properties
awk: syntax error near line 1
awk: illegal statement near line 1
awk: bailing out near line 1
$ awk '/^#/ {next} FNR==NR {app_prd[$0];next} !($0 in app_prd)' app_prd.properties app_dr.properties
awk: syntax error near line 1
awk: bailing out near line 1
uname -a
SunOS mymac 5.10 Generic_150400-09 sun4v sparc SUNW,SPARC-Enterprise-T5220
Can you help fix ?
Last edited by mohtashims; 05-26-2014 at 09:27 AM..
Hi
I need to compare shadow file sizes with their real file counterparts. If the shadow file size differs form the realfile size then it must send a mail. My problem is that our system has over 1600 shadowfiles in different directories, with different names. the only consistancy is the .sh file... (4 Replies)
Hi Guru's
I have a hosts file which has around 1000 entries. I have been asked to change around 500 of the entries. The entries are in a file called hosts.new.
I tried using the diff command to get the uncommon one's. But the output was very confusing.
Would appreciate if you can help me out.... (12 Replies)
Hi All,
I have to compare set of files so I created a case statement with the option to give more than one file to compare. The Problem now i am facing is, if I compare the files directly, from prompt or just using the script only for a particular file then It's saying No difference, but If I... (4 Replies)
I've two files with data like below:
file1.txt:
AAA,Apples,123
BBB,Bananas,124
CCC,Carrot,125
file2.txt:
Store1|AAA|123|11
Store2|BBB|124|23
Store3|CCC|125|57
Store4|DDD|126|38
So,the field separator in file1.txt is a comma and in file2.txt,it is |
Now,the output should be... (2 Replies)
Hi all, I need your help fixing an issue with this code. I am a newbie to UNIX programming and there is an issue with this code I am hoping you can help me correct.
I have two files (system_files with 8342 records and rules1.txt file with 762 records). My understanding from the script below, is... (2 Replies)
Hi Guys ,
we have one directory ...in that directory all files will be set on each day..
files must have header ,contents ,footer..
i wants to compare the header,contents,footer ..if its same means display an error message as 'files contents same' (7 Replies)
I hope I can explain this correctly. I am using Bash-4.2 for my shell.
I have a group of file names held in an array. I want to compare the names in this array against the names of files currently present in a directory. If the file does not exist in the directory, that is not a problem.... (5 Replies)
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
LEARN ABOUT CENTOS
paps
PAPS(1) General Commands Manual PAPS(1)NAME
paps - UTF-8 to PostScript converter using Pango
SYNOPSIS
paps [options] files...
DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves
through the pango ft2 backend.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below.
--landscape
Landscape output. Default is portrait.
--columns=cl
Number of columns output. Default is 1.
--font=desc
Set the font description. Default is Monospace 12.
--rtl Do rtl layout.
--paper ps
Choose paper size. Known paper sizes are legal, letter, a4. Default is A4.
--bottom-margin=bm
Set bottom margin in postscript points (1/72 inch). Default is 36.
--top-margin=tm
Set top margin. Default is 36.
--left-margin=lm
Set left margin. Default is 36.
--right-margin=rm
Set right margin. Default is 36.
--help Show summary of options.
--header
Draw page header for each page.
--markup
Interpret the text as pango markup.
--encoding=ENCODING
Assume the documentation encoding is ENCODING.
--lpi Set the lines per inch. This determines the line spacing.
--cpi Set the characters per inch. This is an alternative method of specifying the font size.
--stretch-chars
Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops
behaviour.
AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>.
This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others).
April 17, 2006 PAPS(1)