Sponsored Content
Top Forums Shell Programming and Scripting Small shell script help required Post 302222177 by jim mcnamara on Wednesday 6th of August 2008 07:06:31 AM
Old 08-06-2008
It means 'if the variable CLOBBER is not zero then set COPY=1'
 

10 More Discussions You Might Find Interesting

1. Linux

shell script required

Hi, iam presenting the input text file format.Of this i need the character count of the number of characters present in each file.The attached file is a combination of 3 text file.each text file starts at record 1 - 34, then the next tetx file starts. What i need is the character count of each... (1 Reply)
Discussion started by: sethunath
1 Replies

2. Shell Programming and Scripting

what is problem with this small shell script.. case statement related

Hi All, this small script is written to recognize user input character.. it is in small case .. upeer case or is a number... but when i input first capital letter say A.. it always gives small character.... what is the problem. #!/bin/bash echo "Enter the character" read a case $a in )... (2 Replies)
Discussion started by: johnray31
2 Replies

3. Shell Programming and Scripting

Very small Shell Script Help...

The following Script takes each extension and determine what category it belongs and then moves it into a directory based on the extension. (for eg. 1.sh, 5.sh, 9.sh together; 4.csh, 120.csh, 6.csh together and 7.ksh, 2.ksh, 59.ksh together) and moves them to their respective directories viz.... (2 Replies)
Discussion started by: marconi
2 Replies

4. Shell Programming and Scripting

Please help to debug a small shell script (maybe AWK problem)?

Hi Buddies, The following is shell scripts which was borrowed from linux box for load average check. it runs good. (this structure is simple, when load average is too high, it will send alert to user) #!/usr/bin/ksh # Set threshold for 1, 5 and 15 minture load avarage # configured for... (4 Replies)
Discussion started by: GreatJerry
4 Replies

5. Shell Programming and Scripting

shell script required...

There are two fields actually one is server name and the other one is Time. Based on time, there are 8 columns and these will be updated with the flag 1 if at all if there is any server name. Time Server name 15 to 18 18 to 21 21 to 24 00 to 03 03 to 06 06 to 09 09 to 12 Server... (3 Replies)
Discussion started by: venkatesht
3 Replies

6. UNIX for Dummies Questions & Answers

A small script required!!

Hi All, I am using korn shell sun solaris 10 What i need is i have to grep one file and if there are any finding then i have set one flag. otherwise continue Please help Regards Arun (9 Replies)
Discussion started by: annyarun
9 Replies

7. Shell Programming and Scripting

Write a small shell script

Hello Forum members, Have a nice day. I have to write a script for the following below scenario. There are 3 applications located in home directory(ie xyz/app) which have multiple directories and files of diff format(.sh,log,other formats). Case 1: I have to find the hardcoded... (8 Replies)
Discussion started by: rajkumar_g
8 Replies

8. UNIX for Dummies Questions & Answers

help needed with a small shell script!

I have a scenario where i need to look for files of these kind filename.log.0 filename.log.1 if the files are present, then no action is to be taken, if not found, then it shud create/touch files with the same name. so can anyone help constructing the script for me..appreciate ur help. ... (5 Replies)
Discussion started by: win4luv
5 Replies

9. Shell Programming and Scripting

Small Help required for merging two files per line!!!

Hi Guys, Sorry to bother everyone again here, but I ran into a small problem that has been after me for some time now. I have a file called file1.txt and has following content - /folder1/fold/folder 10k /folder167fold/folder 10MB /folder2/fold/folder 10G etc.. etc.. ... (1 Reply)
Discussion started by: rockf1bull
1 Replies

10. Shell Programming and Scripting

Small help required to create For loop

Hi, I am new to UNIX and have an issue. I need to check that whether a perticular file name exists or not. I wan to do that in loop to avoid number of IF statements. I need to check that if file10.txt exists rename that to file11.txt. if file9.txt exists rename that to file10.txt. : : if... (5 Replies)
Discussion started by: unankix
5 Replies
mcs(1)							      General Commands Manual							    mcs(1)

NAME
mcs - Manipulates object file comment sections SYNOPSIS
mcs [-v] [-V] [[-a|r|R data] | [-D key] | [-d] ] [-t tag] [-g flags] [-p] obj1...objN OPTIONS
Add a new subsection or append to existing subsection data. By default, the data is treated as a character string and appended to the generic string space subsection. Use -t to specify a subsection. Delete a subsection. Use -t to specify the subsection that you want to delete. Delete one entry within a subsection. Use -t to specify the subsection that this operation applies to. Currently, this option can only be used with the system subsections TAGDESC and TOOLVER. Set tag descriptor flags for a subsection. Use -t to specify the subsection. If flag settings already exist for this tag value, they are overwritten by the new settings. Print a subsection or the entire comment sec- tion. By default, the whole section is dumped. Use -t to specify a subsection. By default, raw data is dumped in hexadecimal. Special for- matting can be used for system-defined subsections. Use with -v to view contents symbolically. This option produces the same output as odump -cm. Use odump -j to view compact relocations data stored in the comment section. Replace subsection data. Use -t to specify the subsection that you want to replace. The same data interpretation applies to both -r and -a. Replace one entry of a subsection with the given data. Use -t to specify the subsection that this applies to. Currently, this option can only be used with the system subsections TAGDESC and TOOLVER. Specify subsection. Within an object, a tag is a unique identifier; only one subsection is permitted of each tag type. Produce verbose output. Can be used with -p. Print version information for the mcs tool. OPERANDS
Character string. Character strings containing white space must be enclosed in quotes. For certain subsections, specially formatted data is accepted. See Special Sections for more information. Unique identifier for an entry within a subsection. See Special Sections for more information. An unsigned integer value or a system-defined tag name. Comma-separated tag descriptor flag names. See Special Sections for more information. A Tru64 UNIX object file that contains a com- ment section header. Archive files are not supported. The object file can be a file, an executable, or a shared library. It can be either compressed or uncompressed. DESCRIPTION
The mcs command allows users to perform operations on the comment section (.comment) of Compaq (e)COFF object files. The comment section of an object can contain information such as the "ident" string from a source file and other information used by components of the Tru64 UNIX development environment. Users can optionally add their own information to the comment section by using the mcs tool. Special Symbols Definitions for symbols related to the comment section are located in /usr/include/scncomment.h. The symbols recognized by mcs are short- ened forms of the names defined in the header file. The symbols consist of the names of system-defined tags and tag descriptor flags. System-defined tag names can be used with the -t option to specify a subsection. These tags are: CMSTAMP COMPACT_RLC STRSPACE TAGDESC IDENT TOOLVER LINKERDEF Tag descriptor flag names can be used with the -g option to specify how other tools should treat a specified subsection. The flag names recognized by mcs are: KEEP STRIP LSTRIP APPEND CHOOSE DELETE ERRMULT ERROR COPY See Special Sections for more information on the TAGDESC and TOOLVER subsections. Special Sections Processing of the TAGDESC and TOOLVER subsections differs from other sections due to the following factors: The -R and -D options can be used for per-entry operations. The data entry format is unique. System tools that create or modify objects rely on tag descriptor flags in the TAGDESC section to know how to process subsections that are not recognized by the tool. This allows new subsection types to be added without requiring changes to system tools that control how they process the new subsections. Three sets of flags are supported: -------------------------- Strip Combine Modify -------------------------- KEEP APPEND COPY STRIP CHOOSE DELETE LSTRIP DELETE ERROR ERRMULT ERROR -------------------------- The "strip" flags tell the linker or stripping tools what subsections belong in a stripped or locally-stripped object: KEEP means do not strip. STRIP means delete if removing the symbol table. LSTRIP means delete if removing local symbol information. The "combine" flags tell tools such as the linker and mcs how to combine data from multiple input subsections of the same type: APPEND means to concatenate raw data for each subsection. CHOOSE means to choose one (random) subsection's data. DELETE tells the tools that this subsection does not belong in an output object. ERRMULT means raise an error if multiple instances of the tag value are found. ERROR means raise an error if the tag value identifies an unknown subsection type. The "modify" flags tell a tool that is modifying a single object what to do with subsections it does not understand: COPY means out- put a subsection identical to the one found in the input object. DELETE means do not output the subsection. ERROR means raise an error if a subsection of this type is encountered. One value from each set is defined for each subsection. The default flag settings are KEEP, APPEND, COPY. Flags are specified symbolically on the command line. The accepted format is a comma-separated list of three flag names with no white space. For example, the default flag setting for a subsection with the tag TAG# is specified as follows: mcs -t TAG# -gKEEP,APPEND,COPY obj The key for a TAGDESC entry is the tag value being described. The TOOLVER subsection accepts data of the form: tool_name,tool_ver- sion_number,version_string The variables tool_name and version_string are character strings, and tool_version_number is a numeric value. For example, to add tool version information for a program named mytool, the command is: mcs -t TOOLVER -a "mytool,0,"Beta, 1/1/99 obj This creates a new entry for the tool named mytool in the TOOLVER subsection. To update this entry, use the -R option: mcs -t TOOLVER -R "mytool,1,"SSB, 1/1/99 obj Note that double quotes have to be passed through the shell for strings containing white space or commas. Make sure that the separa- tor commas have no spaces around them. The key for the TOOLVER entry is the tool name. EXAMPLES
The comment section of an executable file might appear as follows: % mcs -pv objname Tag Length Value Flags: Strip Combine Modify CMSTAMP 0x0 0x0 KEEP CHOOSE COPY COMPACT_RLC 0x208 0x30 STRIP DELETE DELETE --- freeform data --- Use odump -j to view compact relocations. ---- end data --- END 0x0 0x0 KEEP CHOOSE COPY If you want to delete compact relocations: % mcs -d -t COMPACT_RLC objname If you want to add a subsection and specify flags for it: % mcs -a DATA -t10 -g STRIP,APPEND,COPY objname The new subsection, identified by a tag value of 10, contains the string "DATA" in its associated freeform data. The flag settings indicate that the section should be stripped if the symbol table is removed, have data appended if objects with this section are linked or otherwise combined, and left unchanged by an object modifier. ENVIRONMENT VARIABLES
The following environment variables affect the execution of mcs: If set, this path is used for the creation of a temporary file. A tempo- rary file is used if an input object is compressed. SEE ALSO
Commands: odump(1) mcs(1)
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy