Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: mrreds
18,935
Posted By mrreds
Thank you Scrutinizer! For 1st option:# sed...
Thank you Scrutinizer!

For 1st option:# sed 'y//A/' lalo.txt > lalo2.txt
sed: command garbled: y//A/

Second, no char changed.

:(
18,935
Posted By mrreds
Thank you drysdalk! I tried the suggested. ...
Thank you drysdalk!

I tried the suggested.
sed -e 's/\x00\xc1/A/g' lalo.txt > lalo3.txt
sed -e 's/\xc1\x00/A/g' lalo.txt > lalo3.txt

Still the problem, no replace.
18,935
Posted By mrreds
Replace hex values using sed command
File lalo.txt contains:

I need to replace by A using sed command.

od -x lalo.txt

0000000 c10a
0000002

sed -e 's/\xc1\x0a/A/g' lalo.txt > lalo2.txt

Also tried:
sed -e...
3,473
Posted By mrreds
Thank you RudiC, drysdalk! command...
Thank you RudiC, drysdalk!



command is just displaying:

I need to convert any encoding to UTF8.

A customer is sending me files not having UTF8 (seems ANSI), I just need to assign UTF8...
Forum: Solaris 01-13-2018
4,517
Posted By mrreds
uname -a SunOS serv364 5.11 11.3 sun4v sparc...
uname -a

SunOS serv364 5.11 11.3 sun4v sparc sun4v
3,473
Posted By mrreds
Change encoding, no removing special chars. inconv
Hi all,

I'm using iconv command to change files encoding to UTF-8

If my input file has chars as those are removed creating the file without those special chars.

I tried using iconv -c,...
Forum: Solaris 01-13-2018
4,517
Posted By mrreds
View file encoding then change encoding.
Hi all!!

Im using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . Im expecting / looking an output as UTF8 or ANSI / ASCII

Is there command to...
2,869
Posted By mrreds
I'm using; ksh
I'm using;

ksh
2,869
Posted By mrreds
Read a flat file, evaluate and create output. UNIX SCRIPT.
Hi all,

I have a flat file as below;

470423495|1||TSA-A000073800||1|||1
471423495|1||TSA-A000073800||5|||5
472423495|1||TSA-A000073800||2|||7
473423495|1||TSA-A000073800||3|||3

I like to...
4,689
Posted By mrreds
Thank you for the note, but I'm still have the...
Thank you for the note, but I'm still have the issue.

I have added | xargs` to my code string, but the variable still has the CR char.

I added the following code just for validation.
echo...
4,689
Posted By mrreds
A variable is including the Carriage Return char...
Hi all,

I'm reading a file with this layout:

First_Col Second_Col

The Second_Col has values as 1000, -1, 10, 43...

While reading the file I'm getting the second column value with awk...
884
Posted By mrreds
It is working,
I'm now using:

if [ $valu_saved -ne 44 -a $myvalue -eq -1 ]


It is now working!

Thank you all!
884
Posted By mrreds
Using if with numbers (valuation).
Hi everyone!
I'm trying to validate two values in an If.

One value is saved in a variable and the other is hardcoded.

I'm using:

if [ $valu_saved -ne 44 and $myvalue == -1 ]
then

...
10,831
Posted By mrreds
Compare two file sizes.
Hi everyone!

I need to compare two file sizes.

One of them (size) will be stored in a flat file and the other coming from a listed file.

I can now get the first file size using:

...
Showing results 1 to 14 of 14

 

Featured Tech Videos

All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy