Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Passing info from other file into command Post 302344558 by zaxxon on Monday 17th of August 2009 04:09:37 AM
Old 08-17-2009
Not sure why it is not working. Try if a very simple example works and might want to use different #shebang with bash or ksh just to make sure:

Code:
$> cat parm
VAR=123
$> cat mach.ksh
#!/usr/bin/ksh

. ./parm
echo $VAR
$> ./mach.ksh
123

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

scripting: multiple values from file passing to command

one of my colleagues has this question. he has a command, C_CMD which accepts 4 variables, $1 $2 $3 $4 he wants to load up a file with multiple rows, one row per set of variables and then iteratively execute the command based on the content of the file. example: at the command line you'd... (5 Replies)
Discussion started by: LisaS
5 Replies

2. Shell Programming and Scripting

AT command parameter passing to php file

I have a bash script which utilizes a random function and then runs a file at now plus a random time. The problem is, that the php file requires a parameter after it eg: phpfile.php?code=123245b3 When i put in the file including the full path, with the at command, it will run, but not with... (1 Reply)
Discussion started by: thruxmore
1 Replies

3. Shell Programming and Scripting

Splitting a file in to multiple files and passing each individual file to a command

I have an input file with contents like: MainFile.dat: 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 ... (4 Replies)
Discussion started by: rkrish
4 Replies

4. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies

5. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

6. UNIX for Dummies Questions & Answers

passing command arguments from a file?

Hi Im trying to run zip shell command from an Oracle job, but this has limitations. This should take a few of explanaition,.. Oracle allows me to execute a command and then I can set up a fixed number of arguments. Ex: (summarizing in something like..): JOB DEFINITION job_name: test... (4 Replies)
Discussion started by: vegatripy
4 Replies

7. Shell Programming and Scripting

Create a file from ls -l command and append additional info to results

I need to be able to take the results from ls -l command and modify the output as follows: I will run ls -l *.mak My results will be aa.mak bb.mak cc.mak I then need to take those results and create a file that has the following info: dsjj/ubin/aa dsjj/ubin/bb dsjj/ubin/cc ... (3 Replies)
Discussion started by: jclanc8
3 Replies

8. Shell Programming and Scripting

Help with Passing the Output of grep to sed command - to find and replace a string in a file.

I have a file example.txt as follows :SomeTextGoesHere $$TODAY_DT=20140818 $$TODAY_DT=20140818 $$TODAY_DT=20140818I need to automatically update the date (20140818) in the above file, by getting the new date as argument, using a shell script. (It would even be better if I could pass... (5 Replies)
Discussion started by: SriRamKrish
5 Replies

9. Shell Programming and Scripting

Passing Shell variable from file to another command

Hi all, I have a file looks like AAAA 111 BBBB 222 CCCC 333 need to pass variable value like var1=AAAA and var2=111 to another command for three times with next values. stuck over here cat file | while read line do export var1=`awk '{print $1}'` echo $var1 export var2=`cat file... (3 Replies)
Discussion started by: rakeshtomar82
3 Replies

10. UNIX for Beginners Questions & Answers

Creating file and passing argument to a command

Hi All, I am having command to run which will take argument as input file. Right now we are creating the input file by cat and executing the command ftptransfer -i input file cat >input file file1 file2 cntrl +d Is there a way I can do that in a single command like ... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
set_mouse_cursor_bitmap(3alleg4)                                  Allegro manual                                  set_mouse_cursor_bitmap(3alleg4)

NAME
set_mouse_cursor_bitmap - Changes the image Allegro uses for mouse cursors. SYNOPSIS
#include <allegro.h> void set_mouse_cursor_bitmap(int cursor, BITMAP *bmp); DESCRIPTION
This function changes the cursor image Allegro uses if select_mouse_cursor() is called but no native operating system cursor can be used, e.g. because you did not call enable_hardware_cursor(). The cursor argument can be one of: MOUSE_CURSOR_ALLEGRO MOUSE_CURSOR_ARROW MOUSE_CURSOR_BUSY MOUSE_CURSOR_QUESTION MOUSE_CURSOR_EDIT but not MOUSE_CURSOR_NONE. The bmp argument can either point to a valid bitmap or it can be NULL. Passing a bitmap makes Allegro use that image in place of its own default substitution (should the operating system's native cursor be unavailable). The bitmap must remain available for the duration in which it could be used. Passing NULL lets Allegro revert to its default substitutions. The effect of this function will not be apparent until show_mouse() is called. SEE ALSO
install_mouse(3alleg4), show_mouse(3alleg4), set_mouse_sprite(3alleg4), gfx_capabilities(3alleg4), enable_hardware_cursor(3alleg4), show_os_cursor(3alleg4) Allegro version 4.4.2 set_mouse_cursor_bitmap(3alleg4)
All times are GMT -4. The time now is 03:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy