10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
2. Shell Programming and Scripting
Hi all,
I am looking for a quick/short way in awk to check if an associative array has any content.
I know I can split() it to an indexed array and check if the 1st element is set, or cycle through it with something like for( ele in arr ), but I want to avoid that, as I am looking for a shorter... (3 Replies)
Discussion started by: zaxxon
3 Replies
3. Shell Programming and Scripting
Good afternoon,
I am tearing hair out over this. It should be so simple. I have an if statement to evaluate whether or not replication is working. I am testing variables from mysql to see if they are both "Yes". I have put some echo statements in to see how far the code proceeds. It always... (6 Replies)
Discussion started by: jimm
6 Replies
4. Shell Programming and Scripting
Can you explain what this line of script is doing.
What I have understood is :
-- variable C is the name of a software which is either not installed, so it must be installed or allready installed and then should be update if newer version found
-- branch B="$B $C" is to install the software
--... (4 Replies)
Discussion started by: jcdole
4 Replies
5. Shell Programming and Scripting
I want to get newvar outside the while
any ideas?
while read myline; do
var=${myline}
newvar1=$(let "$var")
done
echo $newvar1
I found it its ok now Thank you! (0 Replies)
Discussion started by: sanantonio7777
0 Replies
6. Shell Programming and Scripting
I am setting a number of variables in my script and I would like to test they exist by using a for loop.
e.g.
VAR1=abc
VAR2=xyz
for i in VAR1 VAR2; do
if ; then
echo Alert
fi
done
But of course the $i doesn't refer to the variable itself, rather to the strings VAR1 & VAR2.
Does... (2 Replies)
Discussion started by: Catullus
2 Replies
7. UNIX for Dummies Questions & Answers
hi,
want to create script that takes name of directory and all files and will copy each file to new directory.
then fix errors like files do not exist or no permission to create new directory...
these what I have so far...
#!/bin/sh
dir=~/Documents/Scripts/Copy
for i in $(pwd) $(ls)... (23 Replies)
Discussion started by: me.
23 Replies
8. Shell Programming and Scripting
Hello guys,
First of all, thanks for taking the time to read my post.
So, here I have a file from my honeypot which record IP addresses and web pages visited. I would like to manipulate it in order to create Snort signatures and ACLs.
But I am having troubles to extract the src IP address and... (6 Replies)
Discussion started by: Benou
6 Replies
9. Shell Programming and Scripting
i have a file of the form
9488 14392 1 1.8586e-07
5702 7729 1 1.8586e-07
9048 14018 1 1.8586e-07
5992 12556 1 1.8586e-07
9488 14393 1 1.8586e-07
9048 14019 1 1.8586e-07
5992 12557 1 1.8586e-07
9488 14394 ... (1 Reply)
Discussion started by: vaibhavkorde
1 Replies
10. Shell Programming and Scripting
Is there any way to compare two strings for a greater or less than condition? For example, StringA is "apple" and StringB is "bonnet" and StringC is "captain". Can I only test for equal/not-equal, or is there a way to find out whether StringA is less than StringB, and StringC is greater than... (6 Replies)
Discussion started by: OPTIMUS_prime
6 Replies