10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
Giving those commands:
cat > myfile
1
2
3
^D
cat myfile | awk '{ s=s+$1 ; print s}'
The output is:
1
3
6
It seems like this command iterates each time on a different row so $1 is the first field of each row.. But what caused it to refer to each row ?.
What I mean... (3 Replies)
Discussion started by: uniran
3 Replies
2. UNIX for Dummies Questions & Answers
Hello,
And when you think you know the basics of something, UNIX in this case, something like what I will describe below comes along....
On a Linux system, a "typical" directory with some files. Say 20.
I do:
> ls | sort > mylisting
Now when I:
> vi mylisting
There is mylisting... (13 Replies)
Discussion started by: stavros
13 Replies
3. Shell Programming and Scripting
Hi,
We are moving from linux to AIX servers, and as a result testing our scripts on the new platform. When I run one of our scripts, I get the following error message:
./branchDataUpdate.sh: syntax error at line 21 : `(' unexpected
Following is an extract from the script:
......
........ (1 Reply)
Discussion started by: dawgfather80
1 Replies
4. Shell Programming and Scripting
Hi,
I have shell script that checks processes forever.
But somehow it is killed and I want to know what causes it.
while
do
check the processes if they are running, if not restart them
done
I want to capture the output when the script is terminated, how can I do that?
/Andreas (2 Replies)
Discussion started by: mr_andrew
2 Replies
5. Homework & Coursework Questions
there is a directory /data/users/osa/psidp/dmp/files/cimdir ,it have some subdirectories ,and also the subdirectoriy have it's subdirectoriis.
I want to get all the leaf nodes of the directory path .
but the result of the script is wrong ,how can i get the right result
somebody who can help... (1 Reply)
Discussion started by: fw0037
1 Replies
6. Shell Programming and Scripting
Since I'm not an expert in shell scripting, I have question on sending script result to file. I have script like this...
if condition=0: then
echo "service is not running" | mail -s "Server Status" uname@companyname
fi
sleep 10
if configtion=1: then
echo "service is not running" | mail -s... (3 Replies)
Discussion started by: s_linux
3 Replies
7. Shell Programming and Scripting
hi,
I have a script that will logon to a database siebel and do the select query and then get the result in command prompt of unix.Below the script.
#!/bin/ksh
. $HOME/conf/systemProperties/EnvSetup.properties
#set -x
while read i
do
echo $i
connect1=`sqlplus -silent... (1 Reply)
Discussion started by: ali560045
1 Replies
8. Shell Programming and Scripting
I am in the process of writing a script to change the grub password in the grub.conf file. I thought I had it figured out, but am running into an a problem I can't put my finger on.
Command I am running when I find that the grub.conf file contains "password --md5".
sed... (1 Reply)
Discussion started by: viRaven
1 Replies
9. Shell Programming and Scripting
Hi All,
I probably miss something fundamental here.
I want to rename a bunch of files in subdirectories (that might contain white spaces) with names that are related.
I thought following could do the job:
find . -name *.sh -exec mv {} $(echo {} | sed -e 's/0/1/g') \;
Now to be able to... (5 Replies)
Discussion started by: blued
5 Replies
10. Shell Programming and Scripting
Could any one tell me how to do get result in fraction in shell script.
I am using expr for division of 2 number but it is giving Quitent.
I need it in full fraction value.
please helpp. how to do it using "dc" or "bc" (5 Replies)
Discussion started by: Neerajjaiswal
5 Replies