10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have 4 parameters passed to my shell and i validate if all four are entered using the following snippet:
if
then echo "Not entered"
else echo "entered"
fi
I get the following output as 'Not entered even when i enter the values for all prompts.
Please advise.
Thanks. (5 Replies)
Discussion started by: Jesshelle David
5 Replies
2. Shell Programming and Scripting
Hi,
Will following set up work in bash script? I've got errors if assigning following binary command to a variable. But on the other hand, COMMAND="ls" works. Any explanation please? How can I assign binary command to a variable COMMAND then I can just call ${COMMAND}?
COMMAND="rsync"... (3 Replies)
Discussion started by: hce
3 Replies
3. Shell Programming and Scripting
I have a bash script using "set -o nounset" to prevent unset variables.
However I have created a trap to run some cleanup options upon exit of the script which works fine for CTRL-C, etc. but if it hits and unset variable the trap does not run and the script bails out without having tidied up... (3 Replies)
Discussion started by: jelloir
3 Replies
4. UNIX for Dummies Questions & Answers
Howdy, I got a script that adds a esc char before all chars interpeted by bash shell but I wan't other solution. Is there a way to set ' and " as a non quotes type in bash (some local variable)? Have found that scsh is a non-quoting type shell but after reading Why I don't use scsh as a scripting... (3 Replies)
Discussion started by: johny_be_good
3 Replies
5. Solaris
Hi all,
I don't want to enter below command on solaris every time.
How do i permanently set this command on Solaris.
I know that this operation is a piece of cake on redhat because there is a /etc/rc.local file on it.
But Solaris ????
bash-3.00#export PS1="\e (2 Replies)
Discussion started by: getrue
2 Replies
6. Shell Programming and Scripting
Trying to search a log file for a string, starting from a certain point in the log file. I want to return the number of lines that contain the search string and the total number of lines in the log file. Here's the part of the script I'm having problems with:
set -- $(awk -v... (12 Replies)
Discussion started by: mglenney
12 Replies
7. Shell Programming and Scripting
I'm not talking about the assembly instruction TAS, a better name could be check-and-set :) Anyway, is there a way to simplify the following
if ; then VAR="something"; fi
I have ~20 variables that should be test-and-set like this, and it really looks lame. (2 Replies)
Discussion started by: rayne
2 Replies
8. Shell Programming and Scripting
Hello guys.
In my script, i have the following code:
echo "The tarfile contains these directorys"
tar -tf file.tar > tarlist.txt
cat tarlist | awk -F/ '{print $1 "/" $2}' | nl
echo "Enter path of the directory you want to extract or just press enter to extract everything: "
read path... (1 Reply)
Discussion started by: noratx
1 Replies
9. UNIX for Advanced & Expert Users
Hi,
I work at IT department of a home furnishing company in Canada. Presently we are working on printer issue on UNIX system and we like to set up a dummy printer on the system. We are not much sure about the procedure to try it and it woul dbe great if we get some advice to go ahead.
Thanks... (3 Replies)
Discussion started by: srabanti
3 Replies
10. UNIX for Dummies Questions & Answers
I have been planning to set up a Unix workstation at home to host an Oracle database just for database admin. practice. But I don't know enough about hardware to know whether this can be done on a regular desktop and the required hardware config. If anyone could kindly guide me in this mission I... (4 Replies)
Discussion started by: tmanpakdee
4 Replies