10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to run a query which returns a sum value(a number).
I want to get it in a variable so that i can refer to that variable in different places.
when i am running the following command
variable=`isql -Uuser -Sserver -Ppassword
1> select sum(count(*)) from xyz..abc where clm_id... (2 Replies)
Discussion started by: Sharma331
2 Replies
2. UNIX for Advanced & Expert Users
I'm working on a short BASH script on my Ubuntu box that will run powerpoint scripts with MS Powerpoint Viewer 2007 via WINE.
I can run the presentation when I run it manually but what i'd like to do is have the script look for the newest file then run it.
#! /bin/sh
# Start the newest... (2 Replies)
Discussion started by: binary-ninja
2 Replies
3. Shell Programming and Scripting
Hi,
in shell script, i have the command swstart -p which returns an output. i want to store the output of this command into a variable. how i can do that
excerpt from the script
#!/usr/bin/ksh
#
#
#
# Program: swstart -p
#
# Description: Starts the sentinels on Slave server
... (4 Replies)
Discussion started by: lookinginfo
4 Replies
4. Shell Programming and Scripting
Hi,
Let say I have these 3 files (state, list and myscript). I want to be able get the sample output like below when I run myscript. Any one know how to fix the code? TIA.
~~~~~~~~~~~~~~~
> cat /home/state
CA
> cat /home/list
CA 100 50 20
AUS 120 61 10
> cat myscript... (6 Replies)
Discussion started by: joker_789us
6 Replies
5. Programming
Hi, with this command:
cu -l /dev/ttyACM0 -s 9600 > name.txt
I put the output of the port in a txt
Is posible to do the same (or similar) in a var directly, inside a C program?
cu -l /dev/ttyACM0 -s 9600 > variable ?
I have trying this withs pipes, but i dont know how to... (6 Replies)
Discussion started by: daaran
6 Replies
6. Shell Programming and Scripting
I intend to find the path/full location of a file(filename given by user thru "read filenme") using "find" or any other command and then store it's output in a variable for some other processing.
But struggling to put all things together (i.e finding the fully qualified location of that file and... (4 Replies)
Discussion started by: punitpa
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies
8. Shell Programming and Scripting
Hi,
i have two questions, I am new to programming
1. I have an output of a command and i want to get some specific part of it in a variable. i am trying
sr=`some comand xyz| grep 'Last Changed Rev:' | cut -c19-`
now variable sr gets a end of line character at end.
output of the command... (3 Replies)
Discussion started by: muaz
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I wrote a script to get the oldest file from a directory path (which is passed as a parameter to the script)
#########################################################
XMLFILE_PATH={$1}
cd $XMLFILE_PATH
JPM_FILENAME = `(ls -tr User* | head -1)`
#echo $JPM_FILENAME
###### END... (1 Reply)
Discussion started by: dsrookie
1 Replies
10. Shell Programming and Scripting
With cut -c 8-13 myfile,
I am getting some numeric value.
In my shell script I am trying to assign something like this,
var=cut -c 8-13 myfile
But at the time of execution I am getting -c is not found.
If I dont assign, then script executes well.
Can we not simply use the value from one... (8 Replies)
Discussion started by: videsh77
8 Replies