Sponsored Content
Full Discussion: Escape special character
Top Forums UNIX for Advanced & Expert Users Escape special character Post 302795773 by rbatte1 on Thursday 18th of April 2013 10:41:13 AM
Old 04-18-2013
What are you actually trying to achieve? I can't work it out from what you have written.

SmilieSmilieSmilie


Robin
Liverpool/Blackburn
UK
 

10 More Discussions You Might Find Interesting

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

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

3. Shell Programming and Scripting

Regex escape special character in AWK if statement

I am having issues escaping special characters in my AWK script as follows: for id in `cat file` do grep $id in file2 | awk '\ BEGIN {var=""} \ { if ( /stringwith+'|'+'50'chars/ ) { echo "do this" } else if ( /anotherString/ ) { echo "do that" } else { ... (4 Replies)
Discussion started by: purebc
4 Replies

4. 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&MSG_ID={//MESSAGE_ID} To :- REQUEST_TYPE=PIXEL&MSG_ID= X_EDELIVERY_MESSAGE_ID & BATCH_ID= X_EDELIVERY_BATCH_ID Here is the sed command i am... (2 Replies)
Discussion started by: aakishore
2 Replies

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

6. Shell Programming and Scripting

Escape special character

Hi, How to use * in call to pl/sql block from shell script? The line "select * from" is causing all files and directiores to show up in email notification but if I give all column names then it works, Please let me know how to use '*' instead of giving all column names, in other wirds how to... (2 Replies)
Discussion started by: sandy162
2 Replies

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

8. Shell Programming and Scripting

Function to add escape character before specified character

Hi , I am looking for a function which will do the following. 1. I have a variable which will hold few special chracter like SPECIAL_CHARS="& ;"2. I have an escape character. ESCAPE_CHAR="\"3. Now when I passed some string in the function it will return the same string but now it will... (8 Replies)
Discussion started by: Anupam_Halder
8 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. UNIX for Beginners Questions & Answers

Escape bash-special character in a bash string

Hi, I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
UNBLOCK_DEM(1)						      General Commands Manual						    UNBLOCK_DEM(1)

NAME
unblock_dem - Insert linefeeds into a Digital Elevation Model (DEM) file SYNOPSIS
unblock_dem [-L] DESCRIPTION
The drawmap program processes USGS Digital Elevation Model (DEM) files (along with other types of files) to produce customized maps. Drawmap is able to read these files in their native format. However, since the files usually don't contain any linefeeds, they are diffi- cult for a human to read. Unblock_dem filters a DEM file and inserts linefeeds for human readability. It takes input from the standard input and writes to the standard output. The input data must be in uncompressed form, not in gzip-compressed form. Also, unblock_dem does not work with SDTS DEM files or GTOPO30 files. Unblock_dem normally takes no options, but, if you use the "-L" option, the program will print out some license information and exit. Some DEM files already have embedded linefeeds. Unblock_dem makes a feeble attempt to detect these files and abort. If the detection fails, the results are likely to be garbled, so it is wise to check the format of each file first. The drawmap program, with the "-i" option, will attempt to tell you whether a file contains linefeeds or not. The intended use of unblock_dem is simply to let you conveniently examine the files to see what is in them. However, if you are in the mood for adventure, or if you need to repair a defective file, you can use unblock_dem to make the file easy to edit, then you can edit the file as desired. Drawmap can still process the files after linefeeds are inserted, but will become confused if any line (including the linefeed) is more than 1024 characters long. Drawmap may also become confused if you make any significant changes to the format of the file. You may be able to use this capability to repair faulty data. However, you need to be familiar with the content and structure of DEM files in order to do this effectively. You also need to remember that drawmap depends on DEM files having a predictable structure, and it won't properly parse files that violate this predictability. Do this sort of thing only if you know what you are doing, or if you have a lot of free time on your hands. It should be noted that you can obtain a similar effect by using the command recommended by the USGS: dd if=inputfilename of=outputfilename ibs=4096 cbs=1024 conv=unblock I prefer the unblock_dem command because it simply replaces the last byte of each record with a linefeed. This lets me easily tell how long the original records were. The effect of unblock_dem or dd can be undone by typing: dd if=inputfilename of=outputfilename ibs=4096 cbs=1024 conv=block You may come across files that have a linefeed in the 1025th byte. Drawmap doesn't like these, both because it can't tell (within the space of the first 1024-byte record) whether the file contains linefeeds or not, and because the records exceed the maximum record length of 1024 bytes. You may be able to repair such files by blocking them with the above dd command. SEE ALSO
unblock_dlg(1), drawmap(1) Jul 24, 2001 UNBLOCK_DEM(1)
All times are GMT -4. The time now is 11:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy