10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. Can somebody please explain the following lines of KSH code for me? The code checks all sub directories in a specific location which are numbered (E.g. test_01, test_02 ... etc.), then finds the one with highest number and extracts that number from the dir name into the variable num. I'd just... (9 Replies)
Discussion started by: user052009
9 Replies
2. Homework & Coursework Questions
1. I've been asked to provide a detailed description on how Minix's source code is organised. This may sound slightly simple, but what exactly am I to refer to when explaining? Any documents that would provide assistance to understand whats being asked? Thanks
2. Not applicable:
3.... (1 Reply)
Discussion started by: Menace12
1 Replies
3. UNIX for Dummies Questions & Answers
I need someone to tell me how exactly works the following code αfter /etc/passwd :eek::
cat /etc/passwd|grep "^:"|sed '1,$s/^\(*\):*:\(*\):.*$/ \1 \2 /'|sort -nrk3 -t:I want a good explanation to understand the code please (4 Replies)
Discussion started by: kotsos13
4 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I need your help in understanding the meaning and syntax of the below nawk line.
Here is an extract of a script which I use daily and works well. The script extracts the hostnames and messages within a syslog file. I would also like to extract the message time in the 3rd column by... (2 Replies)
Discussion started by: wthomas
2 Replies
5. Shell Programming and Scripting
Can you please explain the following code plz?
my_cd=' '
while getopts :e: OPTION;
do
case "$OPTION" in
e) my_cd ="$OPTARG";;
esac
done
if ; then
echo " >>> ERROR - I am wrong"
echo " >>> ERROR - Hello"
exit 99
fi
What I don't understand is what is OPTION or... (3 Replies)
Discussion started by: RubinPat
3 Replies
6. Homework & Coursework Questions
I have the following piece of codes. Please explain it to me in great detail how are these codes working.
1. #include <stdio.h>
int main(){
int x;
x=0;
while (x<2 && fork()){
if (!fork()) execlp("echo","x++","x",0);
x++;
system("echo x+x");
}
}
2.
#include <stdio.h>
int i;... (1 Reply)
Discussion started by: prakashabii
1 Replies
7. Shell Programming and Scripting
Hi
I have a line/command which greps certain pattern () from the file and 22 lines AFTER that:
nawk '/\/{c=22}c&&c--' input_file
Can somebody explain the coding in this command (what " c&&c-- " does)? and how to modify this command to output 22 lines BEFORE this pattern () Thanks a lot ... (3 Replies)
Discussion started by: aoussenko
3 Replies
8. Shell Programming and Scripting
Hi
I am new to shell programming, can anyone explain me the following syntax...
it could be helpful if it was brief...
if (1 Reply)
Discussion started by: chandhar
1 Replies
9. Shell Programming and Scripting
Hi it will be very useful for me if anyone gives step by step explanation for the below code:
USAGE="check -S dbserver
where
-S dbserver specifies name of database server
-D dbname specifies name of database on database server
-U userid specifies name of user for database"
... (1 Reply)
Discussion started by: chandhar
1 Replies
10. Shell Programming and Scripting
Hi
I got this part of the script from the mimetool by Perderabo.
I have difficulty in decyphering the syntax specially lines 4,5 & 9.
Also the test condition in line 3.
Could someone help me on this please.
--------------------------------------
pwentry=$(grep "^$(logname):" /etc/paswd)... (2 Replies)
Discussion started by: chaandana
2 Replies