10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have some comments about a previously closed topic whose name is the same as above
Omitted from the discussion was the situation with a "sudo command or sudo within a script".
There is an inconsistency between systems. On some systems $LOGNAME is invariant, on others,
on RedHat sudo... (3 Replies)
Discussion started by: lsatenstein
2. UNIX for Beginners Questions & Answers
Hello... and thanks in advance for any help anyone can offer me with my question! I'm hoping someone will have a little patience with me and walk me through this!
I'm trying to understand a user login process on Centos 7 and I've gotten a bit confused trying to figure out when/how a Gnome... (4 Replies)
Discussion started by: bodisha
3. Shell Programming and Scripting
I wrote a script that is supposed to be run by cron on a daily basis. It works just fine if I run it manually, but due to a lack of environment variables (which are available during my user session but not when cron runs the script) it keeps failing to run successfully.
Here's the... (2 Replies)
Discussion started by: gacanepa
4. Shell Programming and Scripting
I need some help to write a ksh script.
My code so far (pretty bad, sorry):
echo "Calculate average"
while test $UserDecision = y
echo "Enter a number: "
echo "Enter a number: "
echo "Do you want to enter another number?... (2 Replies)
Discussion started by: johnagar
5. Shell Programming and Scripting
I am wondering what is the difference between the USER and LOGNAME environment variables, and under what situations would they be different?
I am using Ubuntu 8.04 32-bit and I do not have 'login' command to test it. (7 Replies)
Discussion started by: royalibrahim
6. Shell Programming and Scripting
I am working on a SunFire 480 - uname -a gives:
SunOS bsmdb02 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Fire-480R
I am tyring to sum up the total size of all the directories for each running database using awk:
for Database in `ps -efl | grep "ora_pmon" | grep -v grep |... (1 Reply)
Discussion started by: jabberwocky
7. Shell Programming and Scripting
In a line such as:
echo -n "How many days back would you like to check? "; read days
How can I ensure that the user has a.) entered a number between 1-30 (not 0 or 31+) and b.) has not just hit enter (ie set it to "") and if it's entered wrong, how do I start the if statement over?
I... (10 Replies)
Discussion started by: earnstaf
I have a problem about use variables. I 've created this variable:
var=`wc -l file.txt | cut -c 1-2`;
In my case var is 8.
When echo shows $n_var does not appear as I want. The question is how can I subtract, this is operate, to my variable.... (1 Reply)
Discussion started by: tonet
moved to correct thread (0 Replies)
Discussion started by: alien12
10. UNIX for Advanced & Expert Users
how can I expand $variable.
I have tried many thing like duble quotes/braces etc, but nothing worked.
I need the solution ASAP. (2 Replies)
Discussion started by: Bsk