10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, :)
I've an issue with the creation of a directory, All work without it :mad: So, below, my scripts with the debug output :
#!/bin/bash
# PATHS
HOME_BACKUP="/home/backup"
HOME_SCRIPT="/home/scripts/test/backup_server"
TARGET="/var/www"
# DATE
DATE_Ymd=$(date +%Y-%m-%d)
#... (1 Reply)
Discussion started by: Arnaudh78
1 Replies
2. Shell Programming and Scripting
This works
#!/bin/ksh
FILE="file.txt"
dosumtin () {
date >> FILE
}
for i in {1..5}
do
dosumtin
done
cat $FILE
But instead of building a file, I want to do the same with a var or an array. That is, to build one that saves all 5 of the subs execution responses in a var or an... (8 Replies)
Discussion started by: popeye
8 Replies
3. Shell Programming and Scripting
hi,
i can see in a script
it contains
var=$(
myFile | grep -i err
)
why has this person done it like this? why not just
var=`myFile | grep -i err`
thanks (9 Replies)
Discussion started by: JamesByars
9 Replies
4. Shell Programming and Scripting
hi all,
i have a for loop statement in my ksh code. it only returns the first value retrieved not the value for the other rows.
ex: acct_id value = returned value in the for loop
1 = 1
2 = 1 (instead of 2)
3 = ... (1 Reply)
Discussion started by: ryukishin_17
1 Replies
5. Shell Programming and Scripting
Hi there, In the following test, how to use shell var for pattern, regular expression. I need to accept pattern at argument, use it to pattern matching at shell script.
Test:
#!/bin/ksh
# name t.sh
exp="a@(a|b)"
touch aa ab ac
echo "\nTest without variable"
echo "---------------------"... (2 Replies)
Discussion started by: tkang007
2 Replies
6. Shell Programming and Scripting
Hi there,
in a script I have
#!/usr/bin/ksh
TEST=hello
export TEST
Problem is, that the variable doesn't get exported. I also tried
typeset -x TEST=hello
When I put the two lines in my .profile, the variable is set fine.
Whats could be the problem here? (4 Replies)
Discussion started by: doc_symbiosis
4 Replies
7. Shell Programming and Scripting
Hi,
I'm trying to execute a job on the last day of every month, for which i'm using the following code in my Korn shell script :
if ];
then
echo allowed only on last day of month. Today is `date +%d` >t.stm
echo Tomorrow is `date +%d -d tomorrow` >s.stm
exit 0
fi
...
....... (7 Replies)
Discussion started by: devilsadvocate
7 Replies
8. Shell Programming and Scripting
i have a script i which i am using
#!/bin/ksh
todate=$(date +%m%d%y)
dir="$dir/port${todate}"
the above one works in linux ...ut not working in solaries
could some one please help me in that (13 Replies)
Discussion started by: mail2sant
13 Replies
9. UNIX for Dummies Questions & Answers
I'm trying to figure out why this if statement won't work:
if || $zipcount != 6 ]]
then
echo ${myline}
echo "ZIPCODE WARNING! ${zipcode} ${zipcount}"
fi
if ]]
then
echo ${myline}
echo "STATE WARNING!... (3 Replies)
Discussion started by: developncode
3 Replies
10. Shell Programming and Scripting
Ih all,
i have multiples ksh scripts for crontab's unix jobs
they all have same variables declarations and some similar functions
i would have a only single script file to declare my variables, like:
var1= "aaa"
var2= "bbb"
var3= "ccc"
...
function ab { ...}
function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies