Hello all,
I am trying to delete all the lines in a particular file having a pattern. The problem is that it has special characters and for some reason is not doing the job.
For eg.
src_file
/home/test/filelist.txt :xxxx:ogog
/home/test/RCH/ogogogg
/home/test/RYHUJ/HHHH... (3 Replies)
Good day, everyone!
Could anybody explain me the following situation.
If I'm running similar script:
Var="anna.kurnikova"
Var2="Anna Kurn"
echo $Var | tr -t "$Var" "$Var2"
Why the output is :
anna KurniKova
instead of Anna Kurnikova?
:confused:
Thank you in advance for any... (2 Replies)
Hi there
I am trying to convert some date seperators in a large newline delimited file. each line i am interested in has a date in the format 27/05/2009 all I want is to convert the slashes to tildes(~) I have come up with the following code but it does nothing.
sed... (5 Replies)
Hi All,
I have the following data in a korn shell variable:
a="FirstValue|SecondValue|ThirdValue"
The value between "FirstValue", "SecondValue" and "ThirdValue" can change, in this case is a comma: "," and I need to print it only once. I need to know what is the separator value.
I... (3 Replies)
Hi,
I need to create an script which reads multi lines and convert it to single line or enter escape sequence at end "\".
e.g.
#!/bin/sh
echo -e "provide me query to run"
read query
create table test(
id int(11),
name char);
echo $query
But it's failing because of multi line... (8 Replies)
My txt file consists of records with 6 numbers followed by 3 characters.
Is there a simple “sed” which will insert a | separator between the 6th and 7th position ?
Many thanks (3 Replies)
Hello All,
I have a problem in counting number of process getting run with my current script name..
Here it is
ps -ef | grep $0 | grep -v grep
This display just one line with the PID, PPID and other details when i print it in the script.
But when I want to count the numbers in my... (11 Replies)
Hi All,
Could you please help to get the below output:
Input:
J1,ELLA_1,ISDR,JJK,TRS
J2,ROSTER,JACK
J3,HUP
...
...
...
Output:
J1,ELLA_1
J1,ISDR
J1,JJK
J1,TRS (3 Replies)
#!/bin/bash
X=(0 2 4 6 7 0 0 0 0)
Let me just say from the start that sed confuses the hell out of me!
In the above line of code how can I use sed to remove all of the 0's except the first one?
I have tried sed -e 's/*$//g' but it removes all of the 0's.
Thank you in advance for any and... (3 Replies)
#!/bin/bash
PH=(KD 6S TC 3D) #playerhand
TCIP=(AH) #topcard in play
A=( "${TCIP::1}" ) # A
B=( "${TCIP:1}" ) # H
C=8
for e in ${PH}; do
if ]; then
echo "$e " >> /home/cogiz/validcards.txt
else
echo... (1 Reply)
Discussion started by: cogiz
1 Replies
LEARN ABOUT REDHAT
xmstringcreateltor
XmStringCreateLtoR(library call) XmStringCreateLtoR(library call)
NAME
XmStringCreateLtoR -- A compound string function that creates a compound string
SYNOPSIS
#include <Xm/Xm.h>
XmString XmStringCreateLtoR(
char *text,
char *tag);
DESCRIPTION
This function is obsolete and exists for compatibility with previous releases. It is replaced by XmStringGenerate. XmStringCreateLtoR cre-
ates a compound string with two components: text and a tag component. This function scans for
characters in the text. When one is
found, the text up to that point is put into a segment followed by a separator component. No final separator component is appended to the
end of the compound string. The direction component defaults to left-to-right. This function assumes that the encoding is single byte
rather than multibyte.
The function will allocate space to hold the returned compound string. The application is responsible for managing the allocated space.
The application can recover the allocated space by calling XmStringFree.
text Specifies a NULL-terminated string to be used as the text component of the compound string.
tag Specifies the tag component to be associated with the given text. The value XmFONTLIST_DEFAULT_TAG is retained for compatibility
with previous releases.
RETURN
Returns a new compound string.
RELATED XmStringCreate(3) and XmStringGenerate(3).
XmStringCreateLtoR(library call)