Sponsored Content
Top Forums Shell Programming and Scripting UNIX script / Command >>> in one line Post 302574142 by Corona688 on Wednesday 16th of November 2011 03:11:11 PM
Old 11-16-2011
Yet again and forevermore I deeply sympathize with anyone forced to use that.

This code will only work in an actual shell. If SAP doesn't run it in an actual shell, it'll give you errors like `outputFile="/tmp/out.html"': command not found

Code:
outputFile="/tmp/out.html" ; ( echo "From: abc@xyz" ; echo "To: def@xyz" ; echo "MIME-Version: 1.0" ; echo "Subject: Test" ; echo "Content-Type: text/html" ; cat $outputFile ) | sendmail -t

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Script with line number at beginning of each line.

Could anybody help me. I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line. Thanks. (5 Replies)
Discussion started by: mascorro
5 Replies

2. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

3. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

4. Shell Programming and Scripting

perl/unix: script in command line works but not in perl

so in unix this command works works and shows me a list of directories find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt but when i try running a perl script to run this command my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies

5. Shell Programming and Scripting

Specify an entire UNIX command as a command line argument

I'm trying to write a bash script called YN that looks like the following YN "Specify a question" "doThis" "doThat" where "doThis" will be executed if the answer is "y", otherwise "doThat". For example YN "Do you want to list the file dog?" "ls -al dog" "" Here's my attempt... (3 Replies)
Discussion started by: LeoKSimon
3 Replies

6. Shell Programming and Scripting

How to read a file, line by line in UNIX script?

#!/bin/bash file1="yxd" for file in `cat file3.txt`; do cat $file1 | awk '{split($1,dp,"."); lend=length(dp); if(lend>2) { dom=dp"."dp; split($2,ipl,","); for(i=1; i<=length(ipl); i++) { if(ipl~/:/) { if(ipl~/:/) i++; rip=ipl; i++; raq=ipl; rtq=0; si=i+4; for(;i<si;i++) rtq+=ipl; rsub="";... (2 Replies)
Discussion started by: veeruasu
2 Replies

7. Shell Programming and Scripting

How to read a two files, line by line in UNIX script and how to assign shell variable to awk ..?

Input are file and file1 file contains store.bal product.bal category.bal admin.bal file1 contains flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0 store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies

8. Shell Programming and Scripting

Calling another Script from Command Line in UNIX

Hi all, I am having problem in understanding the following line of code .. /home/rmsbatch/autoscript/autorms.ksh dc_load_main.ksh -q belk_dc_load_tran_data.seq What's being done here ? what does "-q" means ? What does ".seq" file means in unix "belk_dc_load_tran_data.seq" Please... (3 Replies)
Discussion started by: LoneRanger
3 Replies

9. UNIX for Advanced & Expert Users

Converting xls file to xlsx on UNIX script / command line.

Hi All, Am needing advise on how to convert xls file to xlsx format on Solaris unix command line or scripting. I tried searching online but it looks like I need to either use Perl packages of Excel or Python packages or some other 3rd party tool. Problem is to install any of these will require... (2 Replies)
Discussion started by: arvindshukla81
2 Replies

10. Shell Programming and Scripting

Shell script UNIX to read text file line by line

i have a text file as belows, it includes 2 columns, 1st is the column name, 2nd is the file_name data_file.txt column_name file_name col1 file1 col2 file2 col3 file1 col4 file1 col5 file2 now, i would like to... (4 Replies)
Discussion started by: tester111
4 Replies
UFOND(1)						      General Commands Manual							  UFOND(1)

NAME
ufond - convert UNIX font files into Macintosh format SYNOPSIS
ufond [-dfont] [-macbin] [-res] [-script name] fontfile... DESCRIPTION
The program ufond takes UNIX font files, wraps them in a Macintosh resource fork, creates a family for them, and then wraps that in a macbinary or binhex file. The program reads one or more font files, specified at the end of the command line, using any of the following formats: Glyph Bitmap Distribution (.bdf) TrueType (.ttf) OpenType (.otf) POSTSCRIPT Binary format (.pfb) All fonts with the same font family name will be placed in the same FOND. The program associates the name of a POSTSCRIPT font with a bit- map font, as well as handling bold, italic, and other variants properly. The generated Macintosh files will be in one of three formats: MacBinary (default) dfont (data fork resource file format, used by MacOS X) bare resource fork (you have to know how to transform this into a real resource fork) The program normally assumes that your fonts are in the roman script system. If this is not true you may specify a script directly. The program knows the names of a few scripts (greek, cyrillic, hebrew, arabic) which may be entered directly; otherwise you must know the Mac- intosh script number. OPTIONS
-dfont Generate Macintosh files in dfont format. -macbin Generate Macintosh files in MacBinary format. -res Generate Macintosh files in resource format. -script name Specify the Macintosh script number. AUTHOR
George Williams (gww@silcom.com). Manual page by Ziying Sherwin (sherwin@nlm.nih.gov) and R.P.C Rodgers (rodgers@nlm.nih.gov), Lister Hill National Center for Biomedical Communications, U.S. National Library of Medicine. 23 October 2002 UFOND(1)
All times are GMT -4. The time now is 01:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy