Send files as an attachment without uuencode

Hi All,
Is there anyway we can send files as an attachment? I tried running uuencode but its giving an error as below:

$ uuencode Z1.txt Z1.txt |mailx -s "hi" abc@abc.com
ksh: uuencode:  not found.
Null message body; hope that's ok

When i gave which command then it says there is no uuencode as below:

$ which uuencode
which: 0652-141 There is no uuencode in /usr/bin /etc /usr/sbin /usr/ucb /home_dir/a0021/bin /usr/bin/X11 /sbin . /opt/oracle/product/10.2.0_client/bin.

Thanks in Advance,

Try /usr/bin/base64

Hi,
the path /usr/bin/base64 is not existing in my server....

i have file whic contain data like

01,011600033,011600033,110516,0801,3,90,,2/
02,011600033,011103093,1,110317,0801,,2/
03,000000000000000000,,056,+00000000000,,,703,+00000000000,

i want igore 03 record which contain 000000000000000 very urgent please give reply whic how to write a script just ignore the 0000000000000 only diplay out put like

01,011600033,011600033,110516,0801,3,90,,2/
02,011600033,011103093,1,110317,0801,,2/
03,,,,56,,,,,,703,,

@Sgoud,

please open a new thread.

for your problem, you can use the grep command with -v option

grep -v "000000000000000" filename > newfilename

then use sed command

 
sed 's/000000000000000//g' filename > newfilename
 
or
#backup the original file
cp filename newfilename
 
#replace the contents in the original file
sed -i 's/000000000000000//g' filename

try this..

sed 's,000000000*,,g;s,+,,g' <input_file>

u sent that script is not working it giving error

as requested,

$ cat input_file
01,011600033,011600033,110516,0801,3,90,,2/
02,011600033,011103093,1,110317,0801,,2/
03,000000000000000000,,056,+00000000000,,,703,+00000000000,

$ sed 's,000000000*,,g;s,+,,g' input_file
01,011600033,011600033,110516,0801,3,90,,2/
02,011600033,011103093,1,110317,0801,,2/
03,,,056,,,,703,,

$

@sgoud,

if the script or command throws errors, then post the error. Otherwise it is hard to tell, why it failed.

when you have a question, always open a new thread. Dont suddenly post in another person's thread.

Thanks its working

---------- Post updated at 05:12 AM ---------- Previous update was at 04:49 AM ----------

this is my inputfile

01,011600033,011600033,110516,0801,3,90,,2/
02,011600033,011103093,1,110317,0801,,2/
03,000000000000000000,,056,+00000000000,,,703,+00000000000,,

,904,+00000000000,,/
49,+00000000000000000,00002/
03,004000100015860001,,056,+00029000000,,,703,+00150000000,,

,904,+00000054375,,/
49,+00000000179054375,00002/
03,004000102597629002,,056,+00098668140,,,703,+00100000000,,

,904,+00000197336,,/
49,+00000000198865476,00002/
03,004000104694860002,,056,+00201098996,,,703,+00244527405,,
,904,+00000285805,,/

wher Translate the �904� BAI Code to �905�

  • Translate the �904� BAI Code to �905�
  • Translate the �904� BAI Code to �905�
sed 's/,904,/,905,/g' <input_file>
%%START CBLOADER CBLOADER                   BRBAI2   000090
01,011600033,011600033,110516,0834,2,90,,2/
02,011600033,011103093,1,110317,0834,,2/
03,105581,,015,+00000416418,,,901,+00000000148,,,922,+000000

00354,,/
03,113806,,015,+00000559618,,,901,+00000000096,,,922,+000000

00621,,/
88,902,+0000000025218,,/
88,100,+0000000000000,0000000,,400,+0000000000000,0000000,/
03,8903816,,015,+00000000000,,,045,+00000000000,,,901,+00000
03,10921029,,015,+00000000000,,,901,+00000000000,,,922,+0000
49,+00000000000000000,00004/
98,+00000425683599208,37275,000148890/
99,+00000425683599208,00001,000148892/

this is my input file my question is
1)Code 922 can be found on either the �03� Record, the �88� Record, or not found on the Account at all. Always change �922� Code to �904� BAI Code when ever found and move the record to the Output File.
2)If �922� BAI Code does not exist on �03� Record, �901� BAI Code will be there instead, move �03� Record to Output File untouched.
please send reply as sooon as who write script this file

please send reply as sooon as who write script this file

1) what you tried so far ?
2) i asked you to open a new thread (because you suddenly put your question in another person thread)
3) read the Forum rules before post the questions. The UNIX and Linux Forums - Forum Rules

1 Like

I attached my file that is my input file,1) my question is
Code 922 can be found on either the �03' Record, the �88' Record, or not found on the Account at all. Always change �922' Code to �904' BAI Code when ever found and move the record to the Output File.
2)If �922' BAI Code does not exist on �03' Record, �901' BAI Code will be there instead, move �03' Record to Output File untouched.

1) what you tried so far ?
2) i asked you to open a new thread (because you suddenly put your question in another person thread)
3) read the Forum rules before post the questions. The UNIX and Linux Forums - Forum Rules

1 Like

I attached my file

1) my question is
Code 922 can be found on either the �03' Record, the �88' Record, or not found on the Account at all. Always change �922' Code to �904' BAI Code when ever found and move the record to the Output File.
2)If �922' BAI Code does not exist on �03' Record, �901' BAI Code will be there instead, move �03' Record to Output File untouched.

---------- Post updated at 01:54 AM ---------- Previous update was at 01:13 AM ----------

%%START CBLOADER CBLOADER BRBAI2 000090
01,011600033,011600033,110516,0834,2,90,,2/
02,011600033,011103093,1,110317,0834,,2/
03,105581,,015,+00000416418,,,901,+00000000148,,,922,+000000

00354,,/
03,113806,,015,+00000559618,,,901,+00000000096,,,922,+000000

00621,,/
88,902,+0000000025218,,/
88,100,+0000000000000,0000000,,400,+0000000000000,0000000,/
03,8903816,,015,+00000000000,,,045,+00000000000,,,901,+00000
03,10921029,,015,+00000000000,,,901,+00000000000,,,922,+0000
49,+00000000000000000,00004/
98,+00000425683599208,37275,000148890/
99,+00000425683599208,00001,000148892/
this is my input file my question is
1)Code 922 can be found on either the �03� Record, the �88� Record, or not found on the Account at all. Always change �922� Code to �904� BAI Code when ever found and move the record to the Output File.
2)If �922� BAI Code does not exist on �03� Record, �901� BAI Code will be there instead, move �03� Record to Output File untouched.