Sponsored Content
Top Forums Shell Programming and Scripting Is there a diff way to exec this shell prg?? Post 302123815 by kumarsaravana_s on Wednesday 27th of June 2007 09:23:07 AM
Old 06-27-2007
Quote:
Originally Posted by aigles
Rename your file from ds.ksh to ds.awk (optional but recomended)
Make executable your awk script file.
Run your script file.

Code:
$ mv dt.ksh dt.awk
$ chmod +rx dt.awk
$ dt.awk infile > outfile


HI Aigles,

Thats the way i was executiong before on the shell prompt.But now i want to call this within the ETL tool.The ETL tool which is use understand the scripts when it is executed like this

ksh or sh <path of script> > <path of log> 2>&1

I want to know whether it is possible to execute the script in the above manner instead of pointing the interpreter to nawk -f execution.

Regards,
Kumar.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calling a prg from the shell!!!

Hi, can somebody please answer my questions: 1) is the "sh" available on all unix systems at /bin/sh ??? 2) how to make the following call working: `which java` -cp $JAVA_HOME MyClass since I do not know the location of java :-(( (4 Replies)
Discussion started by: andy2000
4 Replies

2. Shell Programming and Scripting

Exec bash shell via PHP Site !

Hi everybody ! I writed php code so exec bash shell via php (SMS Send via bash shell) but i have problem as follow : 1. When i exec from linux mode : ./sms.sh --- output is "Messages ... OK". Then all message has been sent. 2. When i exec from PHP site --- return value is "Message ... OK" on... (1 Reply)
Discussion started by: lamthenhan
1 Replies

3. Shell Programming and Scripting

how to use exec command in C shell

i have a script where i am reading some lines from a file into another file.. script works fine in bash.. #!/usr/bin/csh awk 'NR>20&&NR<32' try.sum | awk '{print $4 }' >io awk 'NR>20&&NR<32' try.sum | awk '{print $9 }' >io1 awk 'NR>20&&NR<32' try.sum | awk '{print $14 }'>io2 exec 10<io... (1 Reply)
Discussion started by: npatwardhan
1 Replies

4. Shell Programming and Scripting

serach diff filename in diff location using shell scripting

Hi, I am new to shell scripting. please help me to find out the solution. I need a script where we need to read the text file(consists of all file names) and get the file names one by one and append the date suffix for each file name as 'yyyymmdd' . Then search each file if exists... (1 Reply)
Discussion started by: Lucky123
1 Replies

5. Shell Programming and Scripting

Script Variables Inquiry, Values Okay in Standalone Exec, No-Show in Cron Exec

I have the following bash script lines in a file named test.sh. #!/bin/bash # # Write Date to cron.log # echo "Begin SSI Load $(date +%d%b%y_%T)" # # Get the latest rates file for processing. # d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1) filename=$d export filename... (3 Replies)
Discussion started by: ginowms
3 Replies

6. Shell Programming and Scripting

Exec shell from Ant target

hi, I have been using exec in Ant to run shell commands till now, but got a weird error now. I have an ANT target which invokes a shell script. Shell script further invokes one more shell script file to complete the work. Below is Ant Target code. <exec executable="/bin/bash"> ... (2 Replies)
Discussion started by: sukhdip
2 Replies

7. Shell Programming and Scripting

What does the following exec command do it is in the shell file?

I have a shell script, research_dump_sub.sh the first 3 lines are below. the below two lines writing to log file, i am not finding the log file, how to locate, and what is the exec command doing exactly please. and the third line again calling/triggering the shell file. i didn't understood. ... (2 Replies)
Discussion started by: cplusplus1
2 Replies

8. UNIX for Beginners Questions & Answers

Two exec commands in one shell script?

Hi Folks - Is there a way to add two execs to one script? For instance, I need to redirect the stdout and stderr to two separate directories. I want to do this: #::-- Direct STDOUT and STDERROR to repositories --::# exec 2>"${_ERRORFILE}" > "${_LOGFILE}" exec 2>"/new/path/file.err" >... (7 Replies)
Discussion started by: SIMMS7400
7 Replies

9. Programming

Simple shell running with exec family

# Erroneous question, so can be removed. (0 Replies)
Discussion started by: beginnerboy
0 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 11:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy