10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following script used, i am new to shell scripting. tryign to understand.
in the put $BASE_FOLDER/$base_name holds which path.
What does it mean by $1
second path in put command is it constructing this path: /user/hive/warehouse/stage.db/$1
what is $1 holding in above path.
... (2 Replies)
Discussion started by: cplusplus1
2 Replies
2. Shell Programming and Scripting
#!/bin/bash
#...
for i in `ls -c1 /usr/share/applications`
do
name="cat $i | grep ^Name= | cut -d = -f2"
echo $name
#...
done
Now inside name as output is present:
while i want only the result of the command.
Ideally i would like obtain that information using only bash ... or... (8 Replies)
Discussion started by: alexscript
8 Replies
3. 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
4. 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
5. Shell Programming and Scripting
I'm hoping you guys can help me out here. I've been trying different methods to try and get what IW as hoping would be a fairly simple script but has turned into a pain.
Bit of background - I am writing a script to check values in certain failes to ensure they are corerct. I'm runnign this on... (2 Replies)
Discussion started by: stuc
2 Replies
6. 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
7. 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
8. Shell Programming and Scripting
Hi,
in a shell script how can I put the result of a grep command in a variable :
myvariable=grep mystring myfilename
Thank you. (3 Replies)
Discussion started by: big123456
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
How do I store following command output:
export RESULT=`date` &
It works when I do :
export RESULT=`date`
But what I need is when command put it background, I also need that output going to RESULT variable.
Is there any way ?
Thanks
Sanjay (1 Reply)
Discussion started by: sanjay92
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