Sponsored Content
Full Discussion: escape characters..
Top Forums Shell Programming and Scripting escape characters.. Post 302095238 by sharsin2001 on Sunday 5th of November 2006 10:50:38 AM
Old 11-05-2006
Escape

The C is character values...like\" shud be replaced by " ..\t is replaced by horizontal tab\v by vertical tab and so on..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

lp FormFeed Escape characters

I'm trying to modify the /usr/lib/lp/model/netstandard file to generate a header for all the print jobs that are sent, but there is no formfeed defined so the the job prints right after the header with no page break. What is the sequence I need in order to generate a formfeed? Or, do you have... (4 Replies)
Discussion started by: jgordon
4 Replies

2. Shell Programming and Scripting

number of escape characters?

Hi, I am trying to execute the following command from a batch script, but no matter how many escape characters I put in it doesn't execute properly. It works fine from the command line with quotes around the -exec part. #!/bin/sh /usr/local/bin/sudo /usr/atria/bin/cleartool setview -exec... (0 Replies)
Discussion started by: Sebarry
0 Replies

3. Shell Programming and Scripting

Searching for escape characters

Hi all I have been trying to write a script to look for a set of specific escape characters in a file. On viewing the file via vi it shows this : ^ I understand this means no end of line. I have tried a vary of grep parameters such as grep ^\^. filename grep --binary-file=binary without... (8 Replies)
Discussion started by: timcs
8 Replies

4. UNIX for Dummies Questions & Answers

Escape Characters on various shells

Hi, I want to know if escape charaters work on all the popular UNIX shells. More specifically I want to know if echo "\c" will work on most of the UNIX shells and are there any specific shells on which \c won't work. Please help. Thanks, Vineet (2 Replies)
Discussion started by: vineetd
2 Replies

5. UNIX for Advanced & Expert Users

Remove escape characters from string

Hello all, I have a string var which contains formatting characters at the end, it is a string with EScape sequences at the end of it. How can I remove them so that I only keep the 'real' text? I tried : var1=${var1%%\033[0m} does not seem to do the job .... Please help Thanks (2 Replies)
Discussion started by: gio001
2 Replies

6. 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

7. Shell Programming and Scripting

Escape characters

i am executing script from A server which will execute the script in B server , as below. ssh A 'ssh B echo 'select * from testing where name ='test'' i am getting the below output. select * from testing where name=test but i need the output where clause with quotes , tried with... (3 Replies)
Discussion started by: expert
3 Replies

8. UNIX for Dummies Questions & Answers

Questions About Using Escape characters ('\') In Terminal

I have been looking at people posting commands like : $ sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 tofrodos... (2 Replies)
Discussion started by: Ryuinferno
2 Replies

9. 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

10. Shell Programming and Scripting

Escape characters in a variable

Debian 9 64x - LXDE How can i disable escape sequences in a variable? #!/bin/bash #mainscript . "./links.bash" echo "$red_start This text should be red $color_end"#!/bin/bash #links.bash #colors red_start="\eOutput that i get: \e Output expected: This text should be... (5 Replies)
Discussion started by: int3g3r
5 Replies
XrmGetFileDatabase(3X11)												  XrmGetFileDatabase(3X11)

NAME
XrmGetFileDatabase, XrmPutFileDatabase, XrmGetStringDatabase, XrmLocaleOfDatabase, XrmGetDatabase, XrmSetDatabase, XrmDestroyDatabase - retrieve and store resource databases SYNOPSIS
XrmDatabase XrmGetFileDatabase(filename) char *filename; void XrmPutFileDatabase(database, stored_db) XrmDatabase database; char *stored_db; XrmDatabase XrmGetStringDatabase(data) char *data; char *XrmLocaleOfDatabase(database) XrmDatabase database; XrmDatabase XrmGetDatabase(display) Display *display; void XrmSetDatabase(display, database) Display *display; XrmDatabase database; void XrmDestroyDatabase(database) XrmDatabase database; ARGUMENTS
Specifies the resource database file name. Specifies the database that is to be used. Specifies the file name for the stored database. Specifies the database contents using a string. Specifies the resource database. Specifies the connection to the X server. DESCRIPTION
The XrmGetFileDatabase function opens the specified file, creates a new resource database, and loads it with the specifications read in from the specified file. The specified file should contain a sequence of entries in valid ResourceLine format (see section 15.1); the data- base that results from reading a file with incorrect syntax is implementation dependent. The file is parsed in the current locale, and the database is created in the current locale. If it cannot open the specified file, XrmGetFileDatabase returns NULL. The XrmPutFileDatabase function stores a copy of the specified database in the specified file. Text is written to the file as a sequence of entries in valid ResourceLine format (see section 15.1). The file is written in the locale of the database. Entries containing resource names that are not in the Host Portable Character Encoding or containing values that are not in the encoding of the database locale, are written in an implementation-dependent manner. The order in which entries are written is implementation dependent. Entries with represen- tation types other than "String" are ignored. The XrmGetStringDatabase function creates a new database and stores the resources specified in the specified null-terminated string. XrmGetStringDatabase is similar to XrmGetFileDatabase except that it reads the information out of a string instead of out of a file. The string should contain a sequence of entries in valid ResourceLine format (see section 15.1) terminated by a null character; the database that results from using a string with incorrect syntax is implementation dependent. The string is parsed in the current locale, and the database is created in the current locale. If database is NULL, XrmDestroyDatabase returns immediately. The XrmLocaleOfDatabase function returns the name of the locale bound to the specified database, as a null-terminated string. The returned locale name string is owned by Xlib and should not be modified or freed by the client. Xlib is not permitted to free the string until the database is destroyed. Until the string is freed, it will not be modified by Xlib. The XrmGetDatabase function returns the database associated with the specified display. It returns NULL if a database has not yet been set. The XrmSetDatabase function associates the specified resource database (or NULL) with the specified display. The database previously asso- ciated with the display (if any) is not destroyed. A client or toolkit may find this function convenient for retaining a database once it is constructed. FILE SYNTAX
The syntax of a resource file is a sequence of resource lines terminated by newline characters or the end of the file. The syntax of an individual resource line is: ResourceLine = Comment | IncludeFile | ResourceSpec | <empty line> Comment = "!" {<any character except null or newline>} IncludeFile = "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace FileName = <valid filename for operating system> ResourceSpec = WhiteSpace ResourceName WhiteSpace ":" WhiteSpace Value ResourceName = [Binding] {Component Binding} ComponentName Binding = "." | "*" White- Space = {<space> | <horizontal tab>} Component = "?" | ComponentName ComponentName = NameChar {NameChar} NameChar = "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-" Value = {<any character except null or unescaped newline>} Elements separated by vertical bar (|) are alternatives. Curly braces ({...}) indicate zero or more repetitions of the enclosed elements. Square brackets ([...]) indicate that the enclosed element is optional. Quotes ("...") are used around literal characters. IncludeFile lines are interpreted by replacing the line with the contents of the specified file. The word "include" must be in lowercase. The file name is interpreted relative to the directory of the file in which the line occurs (for example, if the file name contains no directory or contains a relative directory specification). If a ResourceName contains a contiguous sequence of two or more Binding characters, the sequence will be replaced with single "." character if the sequence contains only "." characters; otherwise, the sequence will be replaced with a single "*" character. A resource database never contains more than one entry for a given ResourceName. If a resource file contains multiple lines with the same ResourceName, the last line in the file is used. Any white space characters before or after the name or colon in a ResourceSpec are ignored. To allow a Value to begin with white space, the two-character sequence "space" (backslash followed by space) is recognized and replaced by a space character, and the two-character sequence " ab" (backslash followed by horizontal tab) is recognized and replaced by a horizontal tab character. To allow a Value to con- tain embedded newline characters, the two-character sequence " " is recognized and replaced by a newline character. To allow a Value to be broken across multiple lines in a text file, the two-character sequence " ewline" (backslash followed by newline) is recognized and removed from the value. To allow a Value to contain arbitrary character codes, the four-character sequence " nn", where each n is a digit character in the range of "0" - "7", is recognized and replaced with a single byte that contains the octal value specified by the sequence. Finally, the two-character sequence " " is recognized and replaced with a single backslash. SEE ALSO
XrmGetResource(3X11), XrmInitialize(3X11), XrmPutResource(3X11) Xlib -- C Language X Interface XrmGetFileDatabase(3X11)
All times are GMT -4. The time now is 02:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy