10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi every one i have written this simple shell for counting number of word that user need to find from file
but i have get several error when run it. can someone tell me the problem ?
echo "Enter the file name"
read file
echo "enter word"
read word
for i in \`cat $file`
do
if
then... (1 Reply)
Discussion started by: nimafire
1 Replies
2. Shell Programming and Scripting
I have a below snippet of code from my perl script and its causing a problem when the output of $lTAX is 0 (zero) its getting displayed as -0.00. I want output to be 0 not -0.00. Any help would be appreciated.
#!/usr/bin/perl
my $lTotA = 50.94;
my $lVatA = 8.49;
my $lAllocD;
my $lAdjNr =... (4 Replies)
Discussion started by: Devesh5683
4 Replies
3. Shell Programming and Scripting
Hi,
I was trying to format my number like i=1 to 000001 using the below method.
typeset -Z6 i (sorry, corrected)
My shell is K, is not doing, it is supposed to do
Thanks in advance (6 Replies)
Discussion started by: ezee
6 Replies
4. Solaris
i added a default user by command
useradd shekhar
it took user's default directory as /home/shekhar
now when i am going inside /home and giving this command
cd /home
ls-ld
it is not showing any directory named shekhar? why so?
thanx
shekhar (3 Replies)
Discussion started by: shekhar_4_u
3 Replies
5. Shell Programming and Scripting
Hi
actually what happen i have taken a value from database table and stored in variable and that value is 20100601 000000 but this value is stored as string value in database table so
after storing this value in variable a when i did operation on this a variable like
a=`expr ${a} +1`
i m... (1 Reply)
Discussion started by: aishsimplesweet
1 Replies
6. Shell Programming and Scripting
Hello folks
I Hope everyone is fine. I am calculating number of bytes calculation from apache web log.
awk '{ sum += $10 } END { print sum }' /var/httpd/log/mydomain.log
7.45557e+09
it show above number, what should i do it sow number like 7455, i mean if after decimal point above 5 it... (5 Replies)
Discussion started by: learnbash
5 Replies
7. UNIX for Dummies Questions & Answers
Hello,
When I boot up my ancient SUNOS 5 system. it stops at the OK prompt and complains about a bad magic number. I have told that I need run fsck but I cannot seem to do so from the OK prompt. How can I get into a diagnostic mode so I can run fsck?
Thanks, (1 Reply)
Discussion started by: mojoman
1 Replies
8. Shell Programming and Scripting
Hi. I have a problem with my homework. I have to do a Script that will tell me the number of users that are logged in on my system through a network and find out their IP's.
Can you give me an idea?
Thanks (1 Reply)
Discussion started by: mitzu
1 Replies
9. UNIX for Dummies Questions & Answers
Hello all
I am having problems using a bash script to read the input from the user and checking that its a valid number. I only want the user to input a maximum of a 3 number string (321 , 521 , 871 etc.). Anything longer or that includes a chararcter or symbol will display an error message.
... (8 Replies)
Discussion started by: ChrisHoogie
8 Replies
10. Programming
I have string named texts which consist of section label “BOOK-SEC-“. Section starts from 1 to n, where n is a number. For this example conside the value of n is 9. That is, the string variable looks like
“BOOK-SEC-1... (2 Replies)
Discussion started by: SamRoj
2 Replies