10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've got an NTFS file system mounted on my Linux box, which means I can have multi-word directory names. I want to recurse through the directory structure copying stuff from /A to /B when it does not already exist on /B. Here is the chunk of code, and the output of a set -x run on that chunk of... (8 Replies)
Discussion started by: esmith92000
8 Replies
2. Shell Programming and Scripting
Hi there, Im sure there is a simple explanation for this but I have a file like this with no balnk lines
peter
paul
john
I run the command
# var=`grep paul file.txt`
# echo $var
paul
# echo $var | wc -l
1
but when I grep for a value that isnt in the file, i still... (4 Replies)
Discussion started by: rethink
4 Replies
3. Shell Programming and Scripting
Hello
I am having issues with a script I'm working on developing on a Solaris machine.
The script is intended to find out how many times a particular user (by given userid) has logged into the local system for more than one hour today.
Here is my while loop:
last $user | grep -v 'sshd'... (7 Replies)
Discussion started by: DaveRich
7 Replies
4. Shell Programming and Scripting
Hi, I have a very simple script like below:
for n in 10 20 30
do
for a in 30 40 50 60 70 80
do
for r in 2 3 4 5 6 7
do
m=$((r*a))
count=1
while
do
echo "a = " $a ", m = " $m ", n = " $n
... (2 Replies)
Discussion started by: Dark2Bright
2 Replies
5. Shell Programming and Scripting
how to use if-loop in bourne shell with multiple conditions like follows
if
then
commands
fi
it gives me an error
test: ] missing
then i put
if ]
it gives me an error
[[ not found
kindly i need the syntex for the bourne shell (5 Replies)
Discussion started by: ahmad.diab
5 Replies
6. Shell Programming and Scripting
This is a new exercise for me
1.) Create a bourne shell script that can accept 2 arguments/parameters. Name your script as housekeep_files.sh.
2.) The script will delete the files specified in the input file (1st parameter) and will send a notification through email (2nd parameter) the... (1 Reply)
Discussion started by: kdyzsa
1 Replies
7. UNIX for Dummies Questions & Answers
Right now if I have a file that has the following information (with : as the delimiter)
name :address :phone number
I need to be able to do the following commands:
-n search for a name
-p search for a phone number
-l search for a last name starting with a particular
-c find an... (17 Replies)
Discussion started by: Generic
17 Replies
8. Shell Programming and Scripting
Hello all,
I am new to unix and having the below problem.Any help will be appreciated.
Write a Bourn shell script dTOe which takes as an input any number
between 0 and 999 and prints the English value for this number. The
program should display an error message when a NOT digit value entered.... (1 Reply)
Discussion started by: raj1811
1 Replies
9. Shell Programming and Scripting
Hello There,
I am trying to write this SIMPLE script in Bourne Shell but I keep on getting a blank response. Can you see what I am doing wrong? I am simply trying to take the day of the week from our system and when the teachers sign on I want them to see the message of the day, when they exe... (2 Replies)
Discussion started by: catbad
2 Replies
10. Shell Programming and Scripting
Hey there,
Just have a quick question. i've written a program and it needs to
send a email to confirm it's completed. now i've done the
mail -s "Subject" test@test.com
the problem is the program, when run just waits. it doesn't execute the next command unless i press ^D. is there away... (6 Replies)
Discussion started by: Priest_Ridden
6 Replies