I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
Hi everyone,
I am new to unix and bash and in need of some help.
I am writing a script that will execute a SQL query. The script runs and the SQl query runs, but I cannot figure out how to save the results as a file that can be emailed to a user. Here is my scripts thus far:
#!/bin/sh
SID=$1... (2 Replies)
Following is the output of .profile file -
$ cat /home/estdm2/.profile
#!/bin/ksh
set -o vi
alias l="ls -ltr"
umask 002
Following is the path setting script.
$ cat DM_ENV_VARS_NEW.ksh
#!/bin/ksh
. /home/estdm2/.profile
sEnv=$1
echo "We are in ${sEnv} environment"
echo "STEP010... (3 Replies)
Hi
I have a pass a variable from one script to another.
Here are my scripts
Script #1 ./profile
#!/bin/sh
export NAME="Hello"
Script #2 ./test
#!/bin/sh
./profile
echo $NAME
when I run ./test .. i am not getting anything .. why is that? (5 Replies)
Hi, Unix Gurus,
I have a problem need help. I have a script to generate environment variable code same as following:
oracle_sid=abcd
export oracle_sid
when I execute this code with command ./script_nane it succeeded.
when I try to find it with env command or echo $oracle_sid, it does not show... (5 Replies)
I am relatively new to exporting variables, and I just can't seem to make this count work. What I have is the following:
TOTAL=$($IMAGELIST -backupid $IM -U |gawk '{print $5}' |tail -1)|gawk '{print $6}'
RESTORED=$($BPDBJOBS -most_columns -jobid $JOBS |cut -f15 -d,) |gawk '{print $6}'
export... (7 Replies)
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
LEARN ABOUT REDHAT
strtok
STRTOK(3) Linux Programmer's Manual STRTOK(3)NAME
strtok, strtok_r - extract tokens from strings
SYNOPSIS
#include <string.h>
char *strtok(char *s, const char *delim);
char *strtok_r(char *s, const char *delim, char **ptrptr);
DESCRIPTION
A `token' is a nonempty string of characters not occurring in the string delim, followed by or by a character occurring in delim.
The strtok() function can be used to parse the string s into tokens. The first call to strtok() should have s as its first argument. Subse-
quent calls should have the first argument set to NULL. Each call returns a pointer to the next token, or NULL when no more tokens are
found.
If a token ends with a delimiter, this delimiting character is overwritten with a and a pointer to the next character is saved for the
next call to strtok(). The delimiter string delim may be different for each call.
The strtok_r() function is a reentrant version of the strtok() function, which instead of using its own static buffer, requires a pointer
to a user allocated char*. This pointer, the ptrptr parameter, must be the same while parsing the same string.
BUGS
Never use these functions. If you do, note that:
These functions modify their first argument.
These functions cannot be used on constant strings.
The identity of the delimiting character is lost.
The strtok() function uses a static buffer while parsing, so it's not thread safe. Use strtok_r() if this matters to you.
RETURN VALUE
The strtok() function returns a pointer to the next token, or NULL if there are no more tokens.
CONFORMING TO
strtok()
SVID 3, POSIX, BSD 4.3, ISO 9899
strtok_r()
POSIX.1c
SEE ALSO index(3), memchr(3), rindex(3), strchr(3), strpbrk(3), strsep(3), strspn(3), strstr(3)GNU 2000-02-13 STRTOK(3)