The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Print starting 3rd line until end of the file. smc3 Shell Programming and Scripting 1 06-19-2008 01:46 PM
How to delete initial N bytes from the starting of the file using sed? jockey007 Shell Programming and Scripting 3 11-19-2007 08:26 PM
How to delete N bytes from the starting of the file from a C function??? jockey007 High Level Programming 2 11-15-2007 10:25 PM
Hp-UX 11.23 - CDE not starting netwalker HP-UX 4 10-08-2007 12:54 PM
merging 2 files starting at the n'th line of the first file olga Shell Programming and Scripting 2 05-30-2005 10:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-15-2008
KenJo KenJo is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
cat a file starting with ~|

helo all

I have a file where lines start with ~|.
Given a sample line-> ~|21|123|1232|ABC|2135....
So when i use the command

-----cat $file | mailx -s "Rejects : $envid" $recip.dat------

When unix cats the file which holds lines starting with ~| it seems to be it takes those lines as commands and starts putting them on screen.This is upto my Assumption.But donno what happens exactly

So when the command is executed
I get the following warning messages on the screen...

/usr/bin/ksh: 21: not found.
/usr/bin/ksh: 123: not found.
/usr/bin/ksh: 1232: not found.
/usr/bin/ksh: ABC: not found.
/usr/bin/ksh: 2135: not found.


If anyone can help me out in getting these warnings move out, that would be great...

Thanks
KenJo
  #2 (permalink)  
Old 07-15-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Unfortunately ~ is a prefix for some commands used in mail while entering a message. Type mail someone and then ~? to see the list of commands.

You might have to attach the output to the message using uuencode instead, or else you could prefix each line with a space or something if it only needs to be readable by humans.
  #3 (permalink)  
Old 07-16-2008
KenJo KenJo is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
That was of Great help and it worked out...Thanks a lot....
Sponsored Links
Closed Thread

Bookmarks

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0