Sponsored Content
Operating Systems Solaris Reason why some commands need escaped-characters and other not Post 302463672 by jlliagre on Monday 18th of October 2010 07:28:06 AM
Old 10-18-2010
Quote:
Originally Posted by doublefrangelic
One of the commands needs to have the equals-signs and commas escaped (in the file names) but the other command doesn't. Why is this?
There is neither a comma nor an equal sign appearing in the first command line so obviously no need to escape them within it.
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

angle brackets should be escaped automatically

I think that HTML code within posts should be turned off -- the vB Code can provide all the features we need. Then, you should modify the program to automatically escape any angle brackets, so that < gets translated to < and > gets translated to > I see a lot of people garble their posts... (4 Replies)
Discussion started by: PxT
4 Replies

2. Shell Programming and Scripting

Echo escaped \c in SH Shell Any Idea

Hi All, I have got an echo statement with "\c" in it to avoid getting into a newline. Ths script is using #!\bin\sh Any idea what could make it to escape "\c" (4 Replies)
Discussion started by: asami
4 Replies

3. Shell Programming and Scripting

problems with sed and bash. Escaped characters ?

Hi, I'm writing a long script for bash (on RHEL 5.0) to execute many commands. So, my idea is to create a function to deal with error checking and logging (see ceckoutput() below). This works with all commands except for sed. I think it may be a problems with escaped characters. So I did the... (4 Replies)
Discussion started by: macL
4 Replies

4. Shell Programming and Scripting

Editing long records with characters that need to be escaped.

Hi all, I'm new in unix scripting and I've a problem with a script... :confused: I need to read a file, add some fields in the records, and write them in another file, but even when I simply read and write the records, the shell interprets some caracters and the result is that the records... (5 Replies)
Discussion started by: Macs_Linux
5 Replies

5. Shell Programming and Scripting

hidden characters added to commands

Hello everybody. Im really new in shell scripting. Im working with RedHat 4. I have begin to do some scripts to test the posibilitys but Im fancing a disturbing problem. some times the lines that I write add the return character or end-of-file ascii character to the command or argument tha... (2 Replies)
Discussion started by: josebenitez
2 Replies

6. UNIX for Dummies Questions & Answers

Display file with escaped color codes

Hi, I have a file containing color codes: Fri May 25 17:13:04 2012: Starting MTA: exim4^ Loading cpufreq kernel modules...^How can I display it colorized on a linux terminal? (4 Replies)
Discussion started by: ripat
4 Replies

7. Shell Programming and Scripting

Regex:search/replace but not for escaped character

Hi Input: - -- --- ---- aa-bb-cc aa--bb--cc aa---bb---cc aa----bb----cc Output: . - -. -- aa.bb.cc (7 Replies)
Discussion started by: chitech
7 Replies

8. Shell Programming and Scripting

Parsing special characters from variable commands

Hi, I am fairly new to unix scripting and recently tasked with some reporting scripts. The reporting checks several batch jobs and this is quite iterative. Now I am trying to minimize script effort and maximize reusability as there are only slight nuances in the repetitive tasks. For... (3 Replies)
Discussion started by: joeniks
3 Replies

9. UNIX for Dummies Questions & Answers

Using read with escaped variables

Not sure if this is possible, but I'm trying to read in a variable that needs to have its escape backslashes intact. So the person who enters the actual value does not have to type any \ characters. Example: read list X1000\ filecab.txt echo "$list" In this case the \ needs to be... (3 Replies)
Discussion started by: newbie2010
3 Replies

10. Shell Programming and Scripting

[BASH] Getting a semi-tailing backslash when passing (escaped) variables to script

Heyas Figured me had a 'typo' in tui-conf-set, i went to fix it. Now, i also figured, it might be nice to have tui-conf-set report (to console, not only exit code) wether it could save the variable to the file or not. This said, I appended this code: (the tui-title and tui-echo lines are... (3 Replies)
Discussion started by: sea
3 Replies
FPARSELN(3)						   BSD Library Functions Manual 					       FPARSELN(3)

NAME
fparseln -- return the next logical line from a stream LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdio.h> char * fparseln(FILE *stream, size_t *len, size_t *lineno, const char delim[3], int flags); DESCRIPTION
The fparseln() function returns a pointer to the next logical line from the stream referenced by stream. This string is NUL terminated and it is dynamically allocated on each invocation. It is the responsibility of the caller to free the pointer. By default, if a character is escaped, both it and the preceding escape character will be present in the returned string. Various flags alter this behaviour. The meaning of the arguments is as follows: stream The stream to read from. len If not NULL, the length of the string is stored in the memory location to which it points. lineno If not NULL, the value of the memory location to which is pointed to, is incremented by the number of lines actually read from the file. delim Contains the escape, continuation, and comment characters. If a character is NUL then processing for that character is disabled. If NULL, all characters default to values specified below. The contents of delim is as follows: delim[0] The escape character, which defaults to , is used to remove any special meaning from the next character. delim[1] The continuation character, which defaults to , is used to indicate that the next line should be concatenated with the current one if this character is the last character on the current line and is not escaped. delim[2] The comment character, which defaults to #, if not escaped indicates the beginning of a comment that extends until the end of the current line. flags If non-zero, alter the operation of fparseln(). The various flags, which may be or-ed together, are: FPARSELN_UNESCCOMM Remove escape preceding an escaped comment. FPARSELN_UNESCCONT Remove escape preceding an escaped continuation. FPARSELN_UNESCESC Remove escape preceding an escaped escape. FPARSELN_UNESCREST Remove escape preceding any other character. FPARSELN_UNESCALL All of the above. RETURN VALUES
Upon successful completion a pointer to the parsed line is returned; otherwise, NULL is returned. The fparseln() function uses internally fgetln(3), so all error conditions that apply to fgetln(3), apply to fparseln(). In addition fparseln() may set errno to [ENOMEM] and return NULL if it runs out of memory. SEE ALSO
fgetln(3) HISTORY
The fparseln() function first appeared in NetBSD 1.4. BSD
November 30, 2002 BSD
All times are GMT -4. The time now is 10:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy