Hello,
I have records like below that I want to remove any five characters from the end of the string before the double quotes unless it is only an asterik.
I don't care what the characters are, but I need to retain the double quotes after I remove them. Can you point me to some examples of how to accomplish this? Thank you.
I am writing a script to search PCL output and append more PCL data to the end accordingly.
I need to remove the last 88 bytes from the string.
I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on... (3 Replies)
I need help to strip out the first two characters of the variable $FileName. Please help.
FileName=`find . -mtime +0 -name '*'`
Contents of variable $FileName:
./SRIZVI4.MCR_IDEAS_REPORT.LAST.052705.075405.csv
I want to strip out "./" and place the contents in another variable. How do I... (3 Replies)
Hello,
I need to delete the final few characters from a parameter leaving just the first few. However, the characters which need to remain will not always be a string of the same length.
For instance, the parameter will be passed as BN_HSBC_NTRS/hub_mth_ifce.sf. I only need the bit before the... (2 Replies)
Hi
I have a file which contains wrong XML, There are some garbage characters at the end of line that I want to get rid of. Example:
<request type="product" ><attributes><pair><name>q</name><value><!]></value></pair><pair><name>start</name><value>1</value></pair></attributes></request>�J ... (7 Replies)
Hello All,
I have an Expect script that ssh's to a remote server and runs some commands before exiting.
One of the commands I run is the "hostname" Command. After I run this command I save the output
using this line in the code below...
Basically it executes the hostname command, then I... (2 Replies)
Hi all.. I have several unique files that contain one thing in common, and that is acct#. For all files in the directory, I want to append the 10 characters following the word "ACCOUNT:" to the end of the filename.
for example:
I have file 111_123 that contains ACCOUNT:ABC1234567
The file... (5 Replies)
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Hello.
The token is any printable characters between 2 " .
The token is unknown, but we know that it is between 2 "
Tok 1 : "1234x567"
Tok 2 : "A3b6+None"
Tok 3 : "A3b6!1234=@"
The ligne is :
Line 1 :
"9876xABCDE"Do you have any code fragments or data samples in your post
Line 2 : ... (3 Replies)
Hi,
So basically I have this file containing query output in seperated columns.
In particular column I have the below strings:
news
news-prio
I am trying to grep the string news without listing news-prio aswell.
I tried
grep "$MSG_TYPE" ,
grep -w "$MSG_TYPE" ,
grep... (4 Replies)
I have this fastq file:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA
+test-1
GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies
LEARN ABOUT V7
string
STRING(3) Library Functions Manual STRING(3)NAME
strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, index, rindex - string operations
SYNOPSIS
char *strcat(s1, s2)
char *s1, *s2;
char *strncat(s1, s2, n)
char *s1, *s2;
strcmp(s1, s2)
char *s1, *s2;
strncmp(s1, s2, n)
char *s1, *s2;
char *strcpy(s1, s2)
char *s1, *s2;
char *strncpy(s1, s2, n)
char *s1, *s2;
strlen(s)
char *s;
char *index(s, c)
char *s, c;
char *rindex(s, c)
char *s;
DESCRIPTION
These functions operate on null-terminated strings. They do not check for overflow of any receiving string.
Strcat appends a copy of string s2 to the end of string s1. Strncat copies at most n characters. Both return a pointer to the null-termi-
nated result.
Strcmp compares its arguments and returns an integer greater than, equal to, or less than 0, according as s1 is lexicographically greater
than, equal to, or less than s2. Strncmp makes the same comparison but looks at at most n characters.
Strcpy copies string s2 to s1, stopping after the null character has been moved. Strncpy copies exactly n characters, truncating or null-
padding s2; the target may not be null-terminated if the length of s2 is n or more. Both return s1.
Strlen returns the number of non-null characters in s.
Index (rindex) returns a pointer to the first (last) occurrence of character c in string s, or zero if c does not occur in the string.
BUGS
Strcmp uses native character comparison, which is signed on PDP11's, unsigned on other machines.
STRING(3)