How to define multiple environment variables in a shell script?
Hi All,
I am running a shell script on centos 7 to get some variable values and want to declare them as environment variables so that i will use them in another shell script.
I am using below script i am able to define one environment variable but it's not allowing me to do for another variable.
First: me == noob. Whats a good resource for shell script info cause I'm having trouble finding good info.
I'm writing a shell script to automate the setup of a flash 'page flip'.
My current code is below.
the page flip takes an xml file of format
<content>
<pages... (1 Reply)
Hi all!
I know that environment variables can be set on the .bashrc file, but I need to set them from a sh script. I saw a lot of websites that teach this but it doesn't work for me.
#!/bin/sh
DEKTOP=$DESKTOP=:/home/rrodrigues/Desktop
export DESKTOP
if I do echo $DESKTOP returns me... (10 Replies)
oopps! I Meant "Define Variables within a UNIX Script"
What would be the best way to define a variable in a unix shell script so anyone who views this script doesn't know what value is assigned to that variable.
some other location...
a="/usr/lib/fileA"
Unix script...
sed... (5 Replies)
Hello Everyone
I need to create a script file which must append some lines to a target text file, I'm using sed for windows, the script file look like this:
{
a\
STRINGTABLE DISCARDABLE\
BEGIN\
5, 150 {a\
#define RC_SHELL, "%ID_SHELL%"\
#define RC_NAME, "%ID_NAME%"\
END
}
... (1 Reply)
Hi All,
I am using ETL tool Datastage and is installed on Linux environment. Few environment variables are set in datastage. Now my requirement is to use those environment variables in a unix script.
Is there any option I can do it?
Sugeestions from people working on datastage and linux... (1 Reply)
I'm pretty new to scripting in Korn shell so please forgive me...
What I'm trying to do is to create a script that calls multiple other ksh scripts and defines variables for text files.
I need it to define my user defined variables (file paths, date & time stamps, etc that are currently in... (1 Reply)
I have tried with the following:
csh -c 'source ~/.cshrc; exec bash' # works perfectly
(cat ~/.cshrc; echo exec bash) | csh # not working
And, using sed, I successfully retrieved the environment variables from ~/.cshrc
sed -rn 's/setenv\s+(\S+)\s+(.*)$/export \1=\2/p' ~/.cshrc
but now... (6 Replies)
how to store the count of queries in variables inside a filein shell script
my output :
filename
-------
variable1=result from 1st query
variable2=result from 2nd query
.
.
.
. (3 Replies)
Dear Shell script Experts,
I am working on shell script which is defined here, qsub_seq.csh . The purpose of this script is to read few input files (with defined starting index and last index) and make processing faster over server.
For some task, I had 1064 of input files, so I wrote another... (8 Replies)
Discussion started by: emily
8 Replies
LEARN ABOUT MINIX
hier
HIER(7) Miscellaneous Information Manual HIER(7)NAME
hier - file system hierarchy
DESCRIPTION
A tour through the Minix directory hierarchy.
/ root
/bin/ Utility programs, cf /usr/bin/ (1)
cat Show files, cat(1)
sh Shell, sh(1)
mount Mount file systems, mount(8)
...
/boot Boot Monitor, monitor(8)
/dev/ devices (4)
console
Main console, tty(4)
tty* Terminals, tty(4)
hd* Hard disk, hd(4)
fd* Floppy disk, fd(4)
...
/etc/ System configuration and data files, cf /usr/etc/ (1,5,8)
ethers Ethernet addresses database, ethers(5)
fstab File system table, fstab(5)
group Groups database, group(5)
hostname.file
Name of the local system, usage(5)
hosts TCP/IP hosts database, hosts(5)
hosts.equiv
Network equivalent hosts, hosts.equiv(5)
keymap Keymap for custom keyboard, loadkeys(8)
motd Message of the day, login(1)
mtab Mounted file system table, fstab(5)
passwd User database, passwd(5)
psdatabase
Kernel info for ps command, ps(1)
profile
System wide shell profile, sh(1)
rc System startup script, boot(8)
resolv.conf
TCP/IP domain name system, resolv.conf(5)
services
TCP/IP names to services, services(5)
shadow Shadow password database, passwd(5)
termcap
Terminal type descriptions, termcap(5)
ttys Active terminals, init(8)
ttytype
Terminal types, login(1)
utmp User login database, login(1)
...
/minix
Minix kernel image, monitor(8)
/tmp/ Small, short-lived temporary files, cf /usr/tmp/
/usr/ Home directories and more system files
adm/ System administration files (1,5,8)
wtmp
User logins and logouts, login(1)
...
ast/ Honorary home directory of Andrew S. Tanenbaum
Also new user initial files
user/ Home directory of user
.ashrc Ash (shell) startup, ash(1)
.ellepro.b1
Elle (editor) startup (compiled), elle(1)
.ellepro.e
Elle (editor) startup (text), elle(1)
.exrc Ex/vi (editor) startup, ex(1)
.profile
Custom user shell profile, sh(1)
.rhosts Remote user permission file, rhosts(5)
...
bin/ User programs
cc C compiler, cc(1)
cp Copy files, cp(1)
ls List files, ls(1)
man Show manual pages, man(1)
...
etc/ More system data files, cf /etc (8)
...
include/
C-compiler include files
minix/ Minix kernel include files
...
...
lib/ Compiler libraries and other support stuff
cawf/ Text formatter support files, cawf(1)
crontab
Cron jobs, cron(8)
dict/ Word lists
words American English word list, look(1)
...
libc.a C library (Minix-8086 only), cc(1)
arch Per architecture compiler binaries and
libaries, cc(1)
...
local/ Local software, cf /usr/
bin/ Local utilities
man/ Local manual pages
src/ Local sources
...
man/ Manual pages, man(1)
cat*/ Preformatted manual pages
man0/ Section 0, Book style user commands
man1/ User commands
man2/ System calls
man3/ Library routines
man4/ Device files
man5/ File formats
man6/ Games
man7/ Miscellaneous
man8/ System utilities
whatis Table of manual pages, whatis(5)
...
mdec/
boot Bootstrap code, installboot(8)
...
preserve/
Saved elvis editor buffers, elvprsv(8), elvrec(1)
spool/ Mail and command spooling
at/ At jobs, at(1)
past/ Completed at jobs
mail/ Mail drops, mail(1)
user Mailbox of user
...
...
src/ System and command sources (home of bin)
LICENSE
Minix license to use
commands/
Utility sources
crclist
CRC checksums of the source tree, srccrc(8)
lib/ Library sources
fs/ File system
inet/ TCP/IP task
kernel/
Kernel
mm/ Memory manager
boot/ Boot Monitor
tools/ Kernel image making tools, tools(8)
tmp/ Large temporary files
SEE ALSO ls(1), man(1), find(1), grep(1), checkhier(8).
NOTES
Not all of the directories and files shown are present. They must be created as needed.
BUGS
Many of the listed manual references do not yet exist.
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
HIER(7)