I have the following script (parts from help on this forum, thanks y'all):
#!/usr/bin/ksh
date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case "$DAY" in
0)
MONTH=`expr "$MONTH" - 1`
case "$MONTH" in
0)
MONTH=12
YEAR=`expr "$
hii please help me this is the script
Code:
num=$1
sum=0
while [$num -ne 0]
do
x=`expr $num % 10`
sum=`expr $sum + $x`
num=`expr $num / 10`
done
echo "Summation is $sum"
it is giving error
pratyush@ubuntu:~$ sh shell.sh 123
shell.sh: 11: 123: not found
Summation is 0
please help!!!
I am trying to get a script to print out whether a directory is lowercase uppercase or both.
Am using ns-2.29 which I installed from ns-allinone-2.29.3-tar.gz,nam-1.11 and tk8.4.11
when I type nam command in Cygwin I get the following:
$ nam
nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[string equal [tk wind
Hello Guys,For my homework I must write a shell script to do this serie,
I know that I must use the "bc" for that, but for the script's itself i have no idea,(beginner)
Can you plz just help me for have some idea?
Thanks
I wrote a program baut it does not work,
#!/bin/sh
echo "Input number"
read n
counter=0
ans=1
while [ $counter -ne $n ]
do
ans=`expr 4*(-1/(2*$count
Hi,
I don't script often enough to know how to do this, and I can't seem to find a right example online. I have a csv output from an old, old system (Win2K???), from which I want to extract only certain fields.
Hi Guys! I need to solve this.
I want an array to be created by a certain calculation for which I created a function. Now this array is not getting created. See script below I want array b to be the factorial value of array element a. Help is needed. Thanks!
Code:
#!/bin/bash
.
Dear experts,
I'm using solaris 5.10 and bash. I want to zip file "Amount.txt" to "Amount.zip" and rename it to "Amount_<prev_month>_<this year>.zip". For example, file for this month should be renamed to "Amount_06_2012.zip", for next month it should be "Amount_07_2012.zip". I have no problem for zipping the file.
Hi guys,i am trying to set up Vim as my C++ IDE since 2 days and no success so far.I have installed Vim pacman -Q vim
vim 7.3.661-1I have downloaded vim-latex and clang tar balls,extract and place appropriate directorys in ~/.vim e.g.