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,
I wrote a small program to read lines from a file and count the lines. The program is as below:
filename=$1
count=0
cat $filename | while read -r line
do
printf "%5d:%s\n" $count "$line"
count=$((count + 1))
done
echo " $count "
After I run the program, the result is... (4 Replies)
Discussion started by: jianma
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 All
I am not able to delete few line from long file.
I have a big file which is of 53998 B in size i want to delete lines starting from 32768 to 53998 and collect remaining file in new file.
It is giving exception
sed: command garbled: 32768,$countd
Please find the sample script... (2 Replies)
Discussion started by: rajeshorpu
2 Replies
5. Shell Programming and Scripting
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (4 Replies)
Discussion started by: mmiller99
4 Replies
6. 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
7. 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
8. UNIX for Dummies Questions & Answers
Im trying to code some logic into a test script to test for the existence of a file before recreating it. Im using the following line to test for this:
if -r test.txt;
However I get the error message
./testScript.sh: -r: not found
Having read through the man pages im still not clear whats... (2 Replies)
Discussion started by: blakmk
2 Replies
9. Shell Programming and Scripting
Hi, I'm a newer for this languages, and I have a log file, which is something like this:
35.75.253.207 - - "GET /products/orgonizer/title.png HTTP/1.1" 200 1555 "-" "Mozilla 1.4"
Now, I want to write a shell code to accoplish like ./XXX.sh -N n
n is a number by user input, the code should... (5 Replies)
Discussion started by: pnxi
5 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