Hi,
What is the actual difference between these two? Why the following code works for process substitution and fails for command substitution?
while IFS= read -r line; do echo $line; done < <(cat file)executes successfully and display the contents of the file
But,
while IFS='\n' read -r... (3 Replies)
Hi all,
I have a text file containing sql commands. I want to use sed to replace the " character with the ' character. But when i run the command below it just replaces it with a space? Do i have the escape the ' character if i want to use it?
cat sql.txt
update customer set custid =... (1 Reply)
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
Hi
I have to replace in around 60 files a word an replcae it by another
Suppose all the files have a word intelligent i want to replace it by idiot
I am planning to use sed for executing this job
sed 's/\intelligent/idiot/g'
I plan to have a file (test.txt) which contains... (1 Reply)
Hi All,
I have a big log file i want to delete all characters (between 350th to 450th characters) starting at 350th character position to 450th character position.
please advice or sample code. (6 Replies)
I want to know how to, given a string like W87151WR71C, if the 4th and 5th character (in this case 15) are greater than 45, then to add 1 to the 3rd character (in this case 7) and assign the revised string the variable name MODSTRING.
Thanks in advance. This is ultimately to grab info from... (6 Replies)
Hi Gurus,
I am working with a korn shell script. I should replace in a very great file the character ";" with a space.
Example:
2750;~
2734;~
2778;~
2751;~
2751;~
2752;~
what the fastest method is? Sed? Awk?
Speed is dead main point, Seen the dimensions of the files
Thanks (6 Replies)
I want to get the last character from my machine name using the following code, the default shell is bash, the script runs in ksh.
I get 'bad' substitution error on running the script, but works fine if run using dot and space.
Why?
$ echo $0
bash
$ cat -n myenv.sh
1 ... (8 Replies)
A portion of my input is as follows:
1087 IKON01,49 A WA- -1 . -1 . 0 W WA- -1 . -1 . 0 . -1 . -1 -1 -1 -1 -1 -1 W
1088 IKON01,49 A J.@QU80MW. 2... (2 Replies)
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
LEARN ABOUT X11R4
xtfindfile
XtFindFile(3) XT FUNCTIONS XtFindFile(3)NAME
XtFindFile - search for a file using substitutions in the path list
SYNTAX
String XtFindFile(String path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate);
ARGUMENTS
path Specifies a path of file names, including substitution characters.
substitutions
Specifies a list of substitutions to make into a path.
num_substitutions
Specifies the number of substitutions passed in.
predicate Specifies a procedure to call to judge a potential file name, or NULL.
DESCRIPTION
The path parameter specifies a string that consists of a series of potential file names delimited by colons. Within each name, the percent
character specifies a string substitution selected by the following character. The character sequence ``%:'' specifies an embedded colon
that is not a delimiter; the sequence is replaced by a single colon. The character sequence ``%%'' specifies a percent character that does
not introduce a substitution; the sequence is replaced by a single percent character. If a percent character is followed by any other
character, XtFindFile looks through the specified substitutions for that character in the match field and if found replaces the percent and
match characters with the string in the corresponding substitution field. A substitution field entry of NULL is equivalent to a pointer to
an empty string. If the operating system does not interpret multiple embedded name separators in the path (i.e., ``/'' in POSIX) the same
way as a single separator, XtFindFile will collapse multiple separators into a single one after performing all string substitutions.
Except for collapsing embedded separators, the contents of the string substitutions are not interpreted by XtFindFile and may therefore
contain any operating-system-dependent characters, including additional name separators. Each resulting string is passed to the predicate
procedure until a string is found for which the procedure returns True; this string is the return value for XtFindFile. If no string
yields a True return from the predicate, XtFindFile returns NULL.
If the predicate parameter is NULL, an internal procedure that checks if the file exists, is readable, and is not a directory will be used.
It is the responsibility of the caller to free the returned string using XtFree when it is no longer needed.
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
X Version 11 libXt 1.0.5 XtFindFile(3)