I probably did this the hard way, but I iterated through the string 1 character at a time and added that character to a different string. When the character was 253 I added a ~ instead of Character 253. Very clunky, but it got the job done.
NOTE: the IFS is ~
$ hexdump -C EIR.TXT
00000000 0a 45 49 52 2e 45 4e 54 52 59 fd 49 4e 44 2e 52 |.EIR.ENTRY.IND.R|
00000010 41 54 45 2e 43 41 4c 43 0a 46 49 2e 45 49 52 fd |ATE.CALC.FI.EIR.|
00000020 53 43 52 45 45 4e 2e 45 49 52 2e 45 4e 54 52 59 |SCREEN.EIR.ENTRY|
00000030 fd 42 45 4e 45 46 49 54 2e 49 4e 46 4f 0a fd fd |.BENEFIT.INFO...|
00000040 fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd |................|
00000050 fd fd fd 0a |....|
00000054
$
It does indeed seem to be a single character. Whether it's ý or whatever in your character set doesn't matter too much now that we've nailed that down.
Knowing that, you can deal with it many ways.
Code:
$ tr '\375' '~' < ~/EIR.TXT | while IFS="~" read A B C ; do echo $A ; done
EIR.ENTRY
FI.EIR
$ awk -F'\375' '{ print $1 }' EIR.TXT
EIR.ENTRY
FI.EIR
$ IFS="$(printf "\375")"
$ while read A B C < ~/EIR.TXT ; do echo $A ; done
EIR.ENTRY
FI.EIR
$
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
I want to print any matching IP addresse in List1 with List 2;
List 1
List of IP addresses;
161.85.58.210
250.57.15.129
217.23.162.249
74.76.129.101
30.221.177.237
3.147.200.59
170.58.142.64
127.65.109.33
150.167.242.146
223.3.20.186
25.181.180.99
2.55.199.32 (3 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Hi,
Could anyone please shed some light on the following script lines and what is it doing as it was written by an ex-administrator?
cat $AMS/version|read a b verno d
DBVer=$(/usr/bin/printf "%7s" $verno)
I checked that the cat $AMS/version command returns following output:
... (10 Replies)
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Dears,
I've written a script which allows me to send mails in different formats with different attaches. Now I still want to add a feature to this script. My users would like to be able to receive a "read" or "delivered" receipt for their mails.
The script send mails on behalve of an specific... (1 Reply)