Sponsored Content
Top Forums Shell Programming and Scripting Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report Post 302468534 by ctsgnb on Wednesday 3rd of November 2010 05:29:35 AM
Old 11-03-2010
Use the diff command

Code:
grep -vE "^$|^#" initPRD.ora | sort >initPRD.ora.s
grep -vE "^$|^#" initPRE.ora | sort >initPRE.ora.s
diff initPRD.ora.s initPRE.ora.s

or
Display line only in PRD :
Code:
comm -23 initPRD.ora.s initPRE.ora.s

Display line only in PRE :
Code:
comm -13 initPRD.ora.s initPRE.ora.s

Display only lines that are in both :
Code:
comm -12 initPRD.ora.s initPRE.ora.s

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to parse config variables from external file to shell script

How do i use a config.txt to recursively pass a set of variables to a shell script eg my config.txt looks like this : path=c://dataset/set1 v1= a.bin v2= b.bin path=c://dataset/set2 v1= xy.bin v2= abc.bin .................. and so on . and my testscript : (2 Replies)
Discussion started by: pradsh
2 Replies

2. Shell Programming and Scripting

Edit a config file using shell script

I need to edit a config file using shell script. i.e., Search with the 'key' string and edit the 'value'. For eg: below is what I have in the config file "configfile.cfg". Key1=OldValue1 Key2=OldValue2 I want to search for "Key1" and change "OldValue1" to "NewValue1" Thanks for your... (7 Replies)
Discussion started by: rajeshomallur
7 Replies

3. Shell Programming and Scripting

Script to compare all the config files in a cluster of servers.

Hello Lads! Climbing the shell scripting learning curve, i am faced with yet another obstacle! Here's the challenge in front of me : 1) I have 15 servers in a cluster,all of them have the same config files by name : /home/apps/xrm/App_B.cfg 2) The developers change the entries in the... (5 Replies)
Discussion started by: rdlover
5 Replies

4. Shell Programming and Scripting

how to access variables in a config file inside a shell script

I'm writing a shell script. I want to put the variables in a separate config files and use those inside my script. e.g. the config file (temp.conf)will have the values like mapping=123 file_name=xyz.txt I want to access these variables in temp.conf(i.e. mapping and file_name) from inside the... (7 Replies)
Discussion started by: badrimohanty
7 Replies

5. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

6. Shell Programming and Scripting

simple join for multiple files and produce 3 outputs

sh script file1 filea fileb filec ................filez. >>output1 & output2 &output3 file1 z10 1873 1920 z_number1_E59 z10 2042 2090 z_number2_E59 Z22 2476 2560 z_number3_E59 Z22 2838 2915 z_number4_E59 z1 1873 1920 z_number1_E60 z1 ... (9 Replies)
Discussion started by: stateperl
9 Replies

7. Red Hat

Apache virtual host config vs global config problem

Hi folks, I am trying to configure Apache webserver and also a virtual host inside this webserver. For Global server config: /var/www/html/index.html For virtual host config: /var/www/virtual/index.html Both client10 & www10 are pointing to 192.168.122.10 IP address. BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies

8. Shell Programming and Scripting

Update config file using shell script in Solaris 5.10

hi I need to update the value in config.txt value using shell script example: lets say a value in config.txt file is as SEQUENCE=1 after some iteration as the loop ends , the SEQUENCE should get update in the config.txt file with a new value of SEQUENCE=2. also , can anyone please help me... (7 Replies)
Discussion started by: ravidwivedi2288
7 Replies

9. Windows & DOS: Issues & Discussions

(VS 2008) New build config looking files from other folder build config

Hi Team, My new build configuration always looking for the files from the build where i copied from. please help me to resolve this. I am using Visual studio 2008.It has Qt 4.8. plugins,qml,C++ development I created new debug_new build configuration with additional preprocessor from the... (1 Reply)
Discussion started by: SA_Palani
1 Replies

10. Shell Programming and Scripting

Shell script to pass the config file lines as variable on the respective called function on a script

I want to make a config file which contain all the paths. i want to read the config file line by line and pass as an argument on my below function. Replace all the path with reading config path line by line and pass in respective functions. how can i achieve that? Kindly guide. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
ppgsz(1)							   User Commands							  ppgsz(1)

NAME
ppgsz - set preferred page size for stack, heap, and/or other anonymous segments SYNOPSIS
/usr/bin/ppgsz [-F] -o option[,option] cmd | -p pid... DESCRIPTION
The ppgsz utility sets the preferred page size for stack, heap, and/or other anonymous segments for the target process(es), that is, the launched cmd or the process(es) in the pid list. ppgsz stops the target process(es) while changing the page size. See memcntl(2). OPTIONS
The following options are supported: -F Force. Sets the preferred page size options(s) for target process(es) even if controlled by other process(es). Cau- tion should be exercised when using the -F flag. See proc(1). -o option[,option] The options are: heap=size This option specifies the preferred page size for the heap of the target process(es). heap is defined to be the bss (uninitialized data) and the brk area that immediately follows the bss (see brk(2)). The preferred heap page size is set for the existing heap and for any additional heap memory allocated in the future. See NOTES. stack=size This option specifies the preferred page size for the stack of the target process(es). The preferred stack page size is set for the existing stack and newly allocated parts of the stack as it expands. anon=size This option specifies the preferred page size for all existing MAP_PRIVATE anonymous segments of the target process(es), other than heap and stack, which are large enough to fit at least one aligned page of the speci- fied size. For the segments that are large enough, the preferred page size is set starting at the first size- aligned address in the segment. The anon preferred pagesize is not applied to MAP_PRIVATE anonymous segments created in the future. See MAP_ANON in mmap(2). Anonymous memory refers to MAP_PRIVATE pages that are not directly associated with a file in some filesystem. The ppgsz command uses memcntl(2) to set the preferred page size for anonymous segments. See MC_HAT_ADVISE in memcntl(2). At least one of the above options must be specified. size must be a supported page size (see pagesize(1)) or 0, in which case the system will select an appropriate page size. See memcntl(2). size defaults to bytes and can be specified in octal(0), decimal, or hexadecimal(0x). The numeric value can be qualified with K, M, G, or T to specify Kilobytes, Megabytes, Gigabytes, or Terabytes, respectively. 4194304, 0x400000, 4096K, 0x1000K, and 4M are different ways to specify 4 Megabytes. -p pid Sets the preferred page size option(s) for the target process(es) in the process-id (pid) list following the -p option. The pid list can also consist of names in the /proc directory. Only the process owner or the super-user is permitted to set page size. cmd is interpreted if -p is not specified. ppgsz launches cmd and applies page size option(s) to the new process. The heap and stack preferred page sizes are inherited. Child process(es) created (see fork(2)) from the launched process or the target process(es) in the pid list after ppgsz completes will inherit the preferred heap and stack page sizes. The preferred page sizes of all segments are set back to the default system page size on exec(2) (see getpagesize(3C)). The preferred page size for all other anonymous segments is not inherited by children of the launched or target process(es). EXAMPLES
Example 1: Setting the preferred heap and stack page size The following example sets the preferred heap page size to 4M and the preferred stack page size to 512K for all ora--owned processes run- ning commands that begin with ora: example% ppgsz -o heap=4M,stack=512K -p `pgrep -u ora '^ora'` Example 2: Setting the preferred anonymous page size The following example sets the preferred page size of existing qualifying anonymous segments to 512k for process ID 953: example% ppgsz -o anon=512k -p 953 EXIT STATUS
If cmd is specified and successfully invoked (see exec(2)), the exit status of ppgsz will be the exit status of cmd. Otherwise, ppgsz will exit with one of the following values: 0 Successfully set preferred page size(s) for processes in the pid list. 125 An error occurred in ppgsz. Errors include: invalid argument, invalid page size(s) specified, and failure to set preferred page size(s) for one or more processes in the pid list or cmd. 126 cmd was found but could not be invoked. 127 cmd could not be found. FILES
/proc/* Process files. /usr/lib/ld/map.bssalign A template link-editor mapfile for aligning bss (see NOTES). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu (32-bit) | +-----------------------------+-----------------------------+ | |SUNWesxu (64-bit) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ld(1), mpss.so.1(1), pagesize(1), pgrep(1), pmap(1), proc(1), brk(2), exec(2), fork(2), memcntl(2), mmap(2), sbrk(2), getpagesize(3C), proc(4), attributes(5) Linker and Libraries Guide NOTES
Due to resource constraints, the setting of the preferred page size does not necessarily guarantee that the target process(es) will get the preferred page size. Use pmap(1) to view the actual heap and stack page sizes of the target process(es) (see pmap -s option). Large pages are required to be mapped at addresses that are multiples of the size of the large page. Given that the heap is typically not large page aligned, the starting portions of the heap (below the first large page aligned address) are mapped with the system memory page size. See getpagesize(3C). To provide a heap that will be mapped with a large page size, an application can be built using a link-editor (ld(1)) mapfile containing the bss segment declaration directive. Refer to the section ``Mapfile Option'' in the Linker and Libraries Guide for more details of this directive and the template mapfile provided in /usr/lib/ld/map.bssalign. Users are cautioned that an alignment specification may be machine-specific and may lose its benefit on different hardware platforms. A more flexible means of requesting the most optimal underlying page size may evolve in future releases. mpss.so.1(1), a preloadable shared object, can also be used to set the preferred stack and/or heap page sizes. SunOS 5.10 23 Jan 2003 ppgsz(1)
All times are GMT -4. The time now is 07:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy