Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need help to escape special characters in Korn shell script Post 302154283 by Perderabo on Friday 28th of December 2007 10:15:09 PM
Old 12-28-2007
Code:
$ print "Copy \"old_file.txt\" to \"new_file.txt\""
Copy "old_file.txt" to "new_file.txt"
$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can't stop shell interpreting special characters

I am struggling with the following sample code: array1=(a b c d) array2=(* * * *) print ${array1} print ${array2} It returns 'c' and the name of a file in the directory I'm in. I can't for the life of me work out how to prevent the shell interpreting the '*' and just get it to return... (2 Replies)
Discussion started by: Doug97
2 Replies

2. Shell Programming and Scripting

awk print $1 escape all special characters

I'm using awk '{print $1}' and it works most of the time to print the contents of a mysql query loop, but occationally I get a field with some special character in it, is there a way to tell awk to ignore all special characters between my FS? I have >186K records, so building a list of ALL special... (6 Replies)
Discussion started by: unclecameron
6 Replies

3. Shell Programming and Scripting

Replace new line with <br /> & escape special characters

Hi, I wish to replace a new line with br (html) but it doesn't seem to work message=$(echo ${FORM_message} | tr '\r' '<br \/>' ) what it gives me seems to be ... b...? I am also having problem escaping hash sign in cut command: list=$(echo "$line" | cut -d'\#;\#' -f1) ; my intention is... (2 Replies)
Discussion started by: ted_chou12
2 Replies

4. Shell Programming and Scripting

Korn shell to insert cyrillic characters into the databse

i have written a shell script that reads a csv file and inserts tokenized strings into the database. the problem comes when the csv file has cyrillic characters. how do i set the parameters in my shell script(korn shell) so that any characters can be inserted into the database. (3 Replies)
Discussion started by: vkca
3 Replies

5. Shell Programming and Scripting

Replace special characters with Escape characters?

i need to replace the any special characters with escape characters like below. test!=123-> test\!\=123 !@#$%^&*()-= to be replaced by \!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies

6. Shell Programming and Scripting

Need help with sed to escape special characters

Hello Everyone, I need to read an encrypted password from the user and update that value in an xml file. I am trying to use "sed" for searching the appropriate tag and replacing this new value that get from the user. Since the encrypted password can contain special characters(like /,\,&,etc),... (4 Replies)
Discussion started by: majose
4 Replies

7. Shell Programming and Scripting

Escape special characters in SED

Need help in escaping special characters in sed command. Here is the the string which i am trying to find a replace with From :- REQUEST_TYPE=PIXEL&amp;MSG_ID={//MESSAGE_ID} To :- REQUEST_TYPE=PIXEL&amp;MSG_ID= X_EDELIVERY_MESSAGE_ID &amp; BATCH_ID= X_EDELIVERY_BATCH_ID Here is the sed command i am... (2 Replies)
Discussion started by: aakishore
2 Replies

8. Shell Programming and Scripting

How to escape Special Characters in Expect programming?

Hi, I have written a unix expect utility "ssh-login.exp" which connects (ssh) to remote host and execute some shell script. I am calling this "ssh-login.exp" utility from another shell script. "ssh-login.exp" takes username, password, host and shell script path to execute on remote host. All... (1 Reply)
Discussion started by: Mahesh Desai
1 Replies

9. Shell Programming and Scripting

Auto escape script to escape special chars in script args

This is a bit off the wall, but I often need to run scripts where there are argument values that contain special characters. For example, $ ./process.exe -t M -N -o temp.mol.s -i ../molfiles/N,N\',N\'\'-trimethylbis\(hexamethylene\)triamine.mol && sfile_space_to_tab.sh temp.mol.s temp.s It... (1 Reply)
Discussion started by: LMHmedchem
1 Replies

10. Shell Programming and Scripting

How to escape all special characters?

I have an application which I am integrating with that accepts the password via a CLI. I am running in to issues with passwords that contain special characters. I tried to escape them all, but I ran in to an issue where I cannot escape the characters ' ] My attempt is as follows: $... (2 Replies)
Discussion started by: AMG1978
2 Replies
icheck(1)                                                     General Commands Manual                                                    icheck(1)

NAME
icheck - C interface ABI/API checker SYNOPSIS
icheck --canonify [[--baseline FILE] ...] [OPTIONS] [GCC_OPTIONS] [--] files icheck --compare [OPTIONS] old_file new_file DESCRIPTION
A tool for statically checking C interfaces for API and ABI changes. All changes to type declarations that can cause ABI changes should be detected, along with most API changes. icheck is intended for use with libraries, as a method of preventing ABI drift. COMMANDS
Reduce a set of source files to a canonical interface file with --canonify, then compare two such interface files with --compare. If there are interface changes between them, icheck will describe the changes and fail. --canonify [[--baseline FILE] ...] [OPTIONS] [GCC_OPTIONS] [--] files Canonify the source code files (typically .h headers) to be compared later with --compare. Usually used with the -o option to save the summary to a file. --compare [OPTIONS] old_file new_file Reads two canonical interface files generated with --canonify and compares the structure of the source code to the changes in the Application Public Interface (the developer interface or API) and the Application Binary Interface (ABI) used to link against other programs or libraries. OPTIONS
ICHECK OPTIONS -o, --output FILE Emit output to FILE, rather than stdout. --debug N Dump debugging information. --only THING Only process the given THING. --skip-from FILE Skip unnecessary things from FILE. --skip-from-re regexp Skip unnecessary things from files matching the regular expression. --only-from FILE Only take things from FILE. --only-from-re regexp Only take things from files matching the regular expression. GCC_OPTIONS GCC_OPTIONS are passed through to gcc -E HELP OPTIONS --help Display the help synopsis for icheck. EXAMPLES
All source files are preprocessed with gcc, so canonify needs the same include information as the source code - follow the syntax from the Makefile to include -I options to cpp (or gcc) so that all necessary headers can be located. icheck will abort if any required headers can- not be found. The source must be compileable; icheck cannot process files which cannot be directly compiled. If a header is missing #include statements, or otherwise requires being used in a special way, then it cannot be directly processed with icheck. Instead, write a stub C file that sets things up appropriately and then #includes the header. icheck --canonify -o ~/icheck/oldversion -I/usr/include/foo-2.0 /usr/src/bar/src/foobar.h Prepare a text summary of the foobar.h file and all files it includes. The summary is written out to ~/icheck/oldversion. Repeat for /usr/src/bar1/src/foobar.h - the same file in the newer source directory, outputting to a new file, e.g. ~/icheck/newversion. icheck --compare -o ~/icheck/results.txt ~/icheck/oldversion ~/icheck/newversion Writes the report of the comparison of the two summary files. The report indicates all the changes in the ABI and/or API found during the comparison. icheck --canonify -o debian/icheck.canonical -Idebian/foo-dev/usr/include debian/foo-dev/usr/include/foobar.h icheck --compare debian/icheck.manifest debian/icheck.canonical These two statements, included in a debian/rules file, will cause the package build to fail if the API or ABI has changed in unexpected ways, where icheck.manifest is a copy of the expected interface, included in the package. Note that the arguments to --compare are themselves valid C files which are preprocessed, so icheck.manifest can contain C preprocessor logic. This can be useful when a package exports different interfaces depending on the host architecture. In this case, you can't replace it with a new copy of icheck.canonical when the interface changes and you need to update the manifest. Rather than updating the entire man- ifest by hand, put the hand-written interface descriptions in one file (icheck.static-manifest) and then use: icheck --canonify --baseline debian/icheck.static-manifest -o debian/icheck.dynamic-manifest Lastly, create icheck.manifest containing: #include "icheck.static-manifest" #include "icheck.dynamic-manifest" This allows you to update some parts of the manifest by hand, while still automatically generating the rest. OUTPUT
icheck generates a lengthly description of every possible API or ABI change, based on type information. It does not investigate the actual program code, and so it is possible that some type changes it detects are not actual ABI or API changes. However, this normally only hap- pens when the program code was explicitly written for it. If in doubt, assume it's changed. At the end, icheck provides a summary of the changes. Note that the directions here are dependent on the order of the arguments to --com- pare: the older interface must come first, or the directions will be the other way around. The meanings of the various terms are as fol- lows: ABI The ABI is compatible if things compiled against one version of the interface will work when run using the other version. API The API is compatible if things compiled against one version of the interface can be compiled against the other. forwards-compatible An interface is forwards-compatible if things compiled against the old version will work with the new. This is the important feature for soname changes. backwards-compatible An interface is backwards-compatible if things compiled against the new version will work with the old. This is the important feature for shlibs version changes. If you aren't building Debian packages, you probably don't care about changes which aren't backwards-compatible. AUTHOR
icheck was written by Andrew Suffield <asuffield@debian.org>. This manual page was written by Neil Williams <linux@codehelp.co.uk> and Andrew Suffield <asuffield@debian.org>. icheck(1)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy