10-27-2010
Reminds me of waterloo fred, an editor with buffers of commands but in buffers all command had to have doubled escapes, . . . That way madless lies.
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi!
I strated to script since 1 month and I don't have much expirience but this thing here is strange
I have a script where I want to store a svn command in a var to check it later
so it's like this
#!/bin/sh
list=`ssh itadmin@192.168.1.200 "ls /home/svn"` # this stores the list of... (13 Replies)
Discussion started by: ruben.rodrigues
13 Replies
3. Shell Programming and Scripting
Hi,
In the following bash code rather than cutting at a predefined character I would like to cut at position i (i var from loop).
Is this possible? I have tried eval, but either it's not possible or my syntax is wrong.
thanks
Nick
for i in {1..9}
do
theChar=$(echo... (3 Replies)
Discussion started by: de_la_espada
3 Replies
4. 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
5. Shell Programming and Scripting
I seem to be fighting bash's shell expansions..
I set this variable:
CMD="export MVAR=\"1 2 3\""
if I try to run it, it is clear the shell is parsing along the spaces of the contents of MYVAR:
> $CMD
+ export 'MYVAR="1' 2 '3"'
+ MYVAR='"1'
-bash: export: `2': not a valid identifier... (3 Replies)
Discussion started by: bbw
3 Replies
6. Shell Programming and Scripting
Anyone knows why the following function does not work in ksh (it does in bash)?
var() # Displays var value; case insensitive
{
_var="$1"
if ; then
echo ${!_var}
else
_var=$(echo "$_var" | tr 'a-z' 'A-Z')
echo ${!_var}
fi
unset _var
}$ var home
ksh:... (4 Replies)
Discussion started by: victorbrca
4 Replies
7. Solaris
Hi,
Is the contents in /var/log/syslog and /var/adm/messages are same??
Regards (3 Replies)
Discussion started by: vks47
3 Replies
8. 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
9. Shell Programming and Scripting
i try to find way to make string concatenation in csh ( sorry this is what i have )
so i found out i can't do :
set string_buff = ""
foreach line("`cat $source_dir/$f`")
$string_buff = string_buff $line
end
how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies
10. Shell Programming and Scripting
Hi
I have this command, which counts number of lines in a specific file and then prints it on screen.nawk 'NF{c++}END{print "Number of GPS coordinates in file: "c}' $filename
I would like to have the output put into a variable, but can't seem to find the correct argument for it.
How do I... (3 Replies)
Discussion started by: bulleteyedk
3 Replies