10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So i have a script that is like this:
#!/bin/sh
VARA="elementary 1
elementary 2
nursery A
nursery B
highschool AZ"
echo "${ContentOfADifferentSCRIPT}" | sh
i do not have control over the script that is inside the variable "${ContentOfADifferentSCRIPT}".
however, i know that the... (3 Replies)
Discussion started by: SkySmart
3 Replies
2. Shell Programming and Scripting
Hi there,
Everyone knows that errexit is NOT inherited by subshells. But does anyone know why errexit still appears as set with set +o?
The following example highlights the fact that errexit appears set in a subshell (set +o) even though it's actually unset (it does NOT exit with false).
$... (0 Replies)
Discussion started by: chebarbudo
0 Replies
3. Shell Programming and Scripting
Hi,
I am trying to make a Shell Script using which I will update around 10K records in MySQL db each night. For that, I am currently doing the following command in FOR LOOP:
mysql -D $MASTER_DB_NAME -h $MASTER_DB_HOST -u $MASTER_DB_USER -p$MASTER_DB_PASSWD -e "$SQL_Query"
This command is... (2 Replies)
Discussion started by: rahulmittal87
2 Replies
4. UNIX for Dummies Questions & Answers
Can someone post a "for dummies" explanation on how subshells work?
Let's say I want to get a couple of pieces of info from the /etc/passwd file and set them as variables to be echo'd back after all data is gathered. something like
for i in ${grep 5000 /etc/passwd | cut -d : -f 5}... (5 Replies)
Discussion started by: flyboynm
5 Replies
5. Shell Programming and Scripting
Hello,
I have a database of name variants with the following structure:
variant=variant=variant
The number of variants can be as many as thirty to forty.
Since the database is quite large (at present around 60,000 lines) duplicate sets of variants creep in. Thus
John=Johann=Jon
and... (2 Replies)
Discussion started by: gimley
2 Replies
6. 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:
Here is what I am supposed to do, word for word from my assignment page:
1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies
7. Ubuntu
I've written a program in C, called count_0.1 which is essentially a word count program.
I want to be able to use it as a command in the terminal (by typing in count), like when you type in ls, you don't have to go to a directory, find an executable and type in: ./ls
I've tried:
Adding... (1 Reply)
Discussion started by: usernamer
1 Replies
8. Shell Programming and Scripting
I have the following script running with nohup on one of my servers:
#!/bin/bash
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#set log number
#i=1
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#Check if log exits, if so incrememnt log number up so we don't clobber
#while... (8 Replies)
Discussion started by: DeCoTwc
8 Replies
9. UNIX for Dummies Questions & Answers
hi,
i have to type certain commands again and again eg:
ps -ef | grep xyz
is there any way to replace the whole command by a short form
like i just do :
$ psl
and it give me the same output as
$ps -ef | grep xyz
where can we store these commands .....
on unix system and create... (2 Replies)
Discussion started by: kukretiabhi13
2 Replies
10. Shell Programming and Scripting
Hi all,
I have a shell script which calls other shell scripts, depending on the input.
Within a.sh, I have a command which calls b.sh (ie. ksh b.sh)
Normally, we use the exit function to terminate a shell. However, if I choose to call exit from b.sh, I will return to the parent shell who... (4 Replies)
Discussion started by: rockysfr
4 Replies