Send files as an attachment without uuencode


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Send files as an attachment without uuencode
# 8  
Old 06-27-2011
then use sed command

Code:
 
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

# 9  
Old 06-27-2011
try this..

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


Last edited by Franklin52; 06-28-2011 at 03:47 AM.. Reason: Please use code tags for code and data samples, thank you
# 10  
Old 06-27-2011
u sent that script is not working it giving error
# 11  
Old 06-27-2011
as requested,

Code:
$ 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,,

$


Last edited by Scott; 06-27-2011 at 08:58 AM.. Reason: Code tags
# 12  
Old 06-27-2011
@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.
# 13  
Old 06-27-2011
Thanks its working

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

this is my inputfile
Code:
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’

Last edited by Scott; 06-27-2011 at 08:58 AM.. Reason: Please use code tags, and do not "bump" posts
# 14  
Old 06-27-2011
Code:
sed 's/,904,/,905,/g' <input_file>


Last edited by Scott; 06-27-2011 at 08:57 AM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to send attachment without using uuencode and mutt

Hi, In my Linux am unable to send attachment to mail . Since pkgs for mutt and uuencode is not possible to install any other options for sending attachment will be useful. Tried the below options but its not working. mail -s "testmail" -a <filename> abc@mail.com cat <filename>|mail -s... (4 Replies)
Discussion started by: rogerben
4 Replies

2. AIX

Need to send attachment in Mail without using uuencode via script in AIX6.1

Dear All, Would some one help me with this to send a file as attachment in a mail using a script without uuencode... I am working on AIX 6.1, the thing is I dont have uuencode available... Is there any other alternate possible way to send file attachment with the mail without using uuencode... (11 Replies)
Discussion started by: msmadhan11
11 Replies

3. AIX

How to send attachment using "sendmail" command or without uuencode command

Hi Guys, I dont have uuencode, mutt, base64 command available on my aix machine there is any alternative way to send file as attachement in mail. (1 Reply)
Discussion started by: ns64110
1 Replies

4. Shell Programming and Scripting

How to send attachment using "sendmail" command or without uuencode command

Hi Guys, I dont have uuencode, mutt, base64 command available on my aix machine there is any alternative way to send file as attachement in mail. (3 Replies)
Discussion started by: ns64110
3 Replies

5. Shell Programming and Scripting

How to send attachment without using uuencode

H All I want to send attachment in mail but I dont have uuencode installed in AIX server, there is any alternative way to send attachment in mail. (2 Replies)
Discussion started by: ns64110
2 Replies

6. AIX

Send mail with attachment having csv files

Hi, Could anyone please help me to send multiple files of .csv format in one mail. Thanks Aj (2 Replies)
Discussion started by: atinjain05
2 Replies

7. UNIX for Dummies Questions & Answers

uuencode without attachment

Hi All, I'm using uuencode to send out mail from unix to lotus notes,but i dont have any attachment to send out, I'm getting this message in the body of the mail "Usage: uuencode remotedest" however if i dont use uuencode I'm not able to send out mail Please help Thanks (1 Reply)
Discussion started by: gwrm
1 Replies

8. UNIX for Dummies Questions & Answers

Binary txt file received when i use uuencode to send txt file as attachment

Hi, I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes.. i wanna attach a text file and send to a mail id..used the following code : uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com it works... (2 Replies)
Discussion started by: ash22
2 Replies

9. UNIX for Advanced & Expert Users

send attachment without uuencode

Hello - In unix, can you tell me IF there is a way to send attachments via email without using uuencode command? Thank you (3 Replies)
Discussion started by: panchpan
3 Replies

10. Shell Programming and Scripting

How to send the multi files as a attachment

Hi all, Could you please guide me to write the shell script, to send a multi file as a attachement . Thanks Murugesh (1 Reply)
Discussion started by: Murugesh
1 Replies
Login or Register to Ask a Question