07-31-2014
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there!
I'm trying to write a script that will capture output from a command and assign it to a variable.
Let's say, for example, I'd like to catch from inside the script whatever the following command outputs:
ls *.aaa
and put it into a variable "listoffiles".
What I tried was:
set... (3 Replies)
Discussion started by: machinogodzilla
3 Replies
2. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
3. Shell Programming and Scripting
i have an oracle function which returns two values, one is the error message if the function encounters anything and another one which returns a number
i need to capture both
and pass it on to unix shell script
how to do it (2 Replies)
Discussion started by: trichyselva
2 Replies
4. Programming
Hi,
I am new to C and have a little problem.
I am not planning to be a C expert, but this would be nice to understand.
The problem is that a 'system' call prints it output to stdout, when I do not expect this.
This is the program:
trial.c
#include <ctype.h>
#include <unistd.h>... (5 Replies)
Discussion started by: ejdv
5 Replies
5. Shell Programming and Scripting
Hi,
I want to execute an oracle function from unix script so for that I created a sample oracle function as below:
create or replace
function test_fn(test_date out varchar2)
RETURN varchar2
IS
BEGIN
select to_char(sysdate,'DD-MON-YY') into test_date from dual;
return test_date;... (5 Replies)
Discussion started by: dips_ag
5 Replies
6. Programming
Hi ,
I wonder if in java I can pipe the below output of the printf into a variable:
System.out.printf(" This is a test %s\n", myVariable);
I want to keep the output of the printf command to create my history array.
Thanks. (2 Replies)
Discussion started by: arizah
2 Replies
7. Shell Programming and Scripting
hey guys in only new to scripting as such, but i have a problem.
i want to take the output of a search i do in the command line to then be in a variable but only a certain part of the output.
this this what im doing:
-bash-2.05b$ ldapsearch -x '(dn:=dc)' dc|grep dc=
# base... (1 Reply)
Discussion started by: jmorey
1 Replies
8. UNIX for Dummies Questions & Answers
Hello All,
I have the below script and output.
cat test.sh
#!/bin/bash -x
logit()
{
echo " - ${*}" > ${LOG_FILE}
}
LOG_FILE=/home/infrmtca/bin/findtest.log
VAR=`find . -type f -name "*sql"`
logit $VAR
Output:
cat /home/infrmtca/bin/findtest.log
-... (9 Replies)
Discussion started by: Ariean
9 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
#! /bin/ksh
v="ORG_ID"
... (2 Replies)
Discussion started by: sujitdas2104
2 Replies
10. Red Hat
Hi Experts,
Am writing a code which need to check for the previous day date and pickup the file as per the previous day date.
Problem: Why variable "YDATE" is empty ?
O/S: RHEL 5.6
Shell: BASH
Desired O/P: ls -lrt /opt/test/user/atsuser.NHU/out/demon.08272017
When I checked the... (3 Replies)
Discussion started by: pradeep84in
3 Replies
LEARN ABOUT MOJAVE
set_color
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)