By typo missed the data in between. The expectation of your's is correct, could you please provide the logic how would you processed the data and got the result. The file got generated by VB script.
It was read by eye and converted by brain to hopefully confirm that we are working on the correct input to output relationship, hence why CODE tags are so important. I have done no coding so far.
Is the special character always the same? Can you confirm what character it is with od? If you can cut down a copy of the file to just contain the character, then use:-
and paste the output here in [CODE] & [/CODE] tags, then that would help.
Is this a large file that needs the powerful processing of awk, sed or perl, or would a simpler, but slower loop in a shell be acceptable? If the file is smaller , but there are many than you want to call in a loop, sometimes calling awk etc. can work out slower.
I was expecting to see just a single line with the character code for ú and a terminating 0a
I don't see a match for the rest of your sample either. I was looking for hex strings like this:-
The next character would be the ú that we're interested in. I don't fancy working out byte-for-byte what there is and what's which.
The above is from your first line up to the ú
Can you clarify which input you have used for this? If you have to sanitise the input, please provide the matching output for the sanitised version.
A Merry Xmas to all of you.
And, as a special present to vbe (he knows why) a little exercise:
#! /bin/ksh
pPrintSnow ()
{
typeset -i iLen=$1
while (( iLen )) ; do
if ! (( RANDOM % 31 )) ; then
printf "%1s" "."
else
printf "%1s" " "
fi
((... (0 Replies)
Hi,
I have a string wherein i need to replace special characters with backslash and that character.
Ex:
If my string is a=qwerty123@!,
then the new string should be a_new=qwerty123\@\!\,
Thanks (3 Replies)
Hello
I created 3 files by:
dd if=/dev/urandom bs=1024 count=1000000 of=./testfile1
dd if=/dev/urandom bs=1024 count=5000000 of=./testfile2
dd if=/dev/urandom bs=1024 count=10000000 of=./testfile3
Now I want to know how to make a change in a specific byte and/or line of theses files? (2 Replies)
Hi,
I have a requirement to search for a pattern in each line in a file and remove the in between words till the 3rd occurrence of double quote (").
Ex: CREATE TABLE "SCHEMANAME"."AMS_LTV_STATUS"
(Note: "SCHEMANAME" may changes for different schemas. Its not a fixed value)
I need to... (2 Replies)
How can I replace the follong text including to number 7000?
cat tmp0.txt
Winston (UK) Wong
I would the 7000 to replace Winston (UK) Wong.
I fail with method below:
sed ' s /Winston\(UK\)Wong/7000 tmp0.txt' (1 Reply)
I would like to replace /n with ',' and after replace remove last semicolon then put a open brace in starting and closing brace in end of line. See below example:
input:
1234
3455
24334
234
output:
('1234,'3455',24334','234')
Thanks (3 Replies)
Hi,
I am beginner to Shell Scripting.
I have a String like this "testabcdef", i need the first character as it is and the remaining character should be replaced by the the '*' character. e.g(t***********)
PLZ Suggest me. (5 Replies)
I need to do the following:
text in the format of: ADDRESS=abcd123:1111
- abcd123:1111 is different on every system.
replace with: ADDRESS=localhost:2222
sed 's/ADDRESS=<What do I use here?>/ADDRESS=localhost:2222/g'
Everything I've tried ends up with:
... (3 Replies)