10 More Discussions You Might Find Interesting
1. Programming
Not sure if this is possible, but I've tried this about a thousand ways now. I am making something with a lot of arrays. I thought I could put the array names into a separate array and then loop through them to call all of their elements. This is the best I've got so far:
#include <stdio.h>... (4 Replies)
Discussion started by: Azrael
4 Replies
2. Shell Programming and Scripting
Hello friends,
I want to run this code on every document in every sub-directory.
tr -d '\n' < MulitpleInput.txt | awk '{gsub(/\. /,".\n");print}' | grep “\
I tried several looping techniques but couldn't get it to run in this example. Any ideas?
Thank you (2 Replies)
Discussion started by: danbroz
2 Replies
3. Shell Programming and Scripting
14`~abc`~9`~11
14`~abc`~9`~10
36`~ee`~7`~9
36`~ee`~8`~9
58`~rtt`~12`~7
70`~gff`~13`~8
86`~tyu`~6`~12
86`~tyu`~6`~13
92`~mjh`~5`~6
28`~jkl`~10`~DNA
32`~mjk`~SNA`~5
82`~jkli`~11`~DNA
------------------------------------
Field Seperator: `~
The concept is to start with SNA in the 3rd... (8 Replies)
Discussion started by: barath
8 Replies
4. Shell Programming and Scripting
complinagetest () #function name
{
if ;then
rm complins.dat
fi
touch complins.dat
i=0
while read line
do
if ; then
va=`grep -w "$line" datalins1.dat | awk BEGIN'{FS="\`~"}{if ( $3=="'$line'" ) {print $4}}'`
i=$(($i+1))
varits=$(echo $va|awk -v varif="$i" '{print... (1 Reply)
Discussion started by: amitpaul01
1 Replies
5. Shell Programming and Scripting
Hi all,
I am attempting to create a shell script to optimize some routine process.
I want this script can let user select the actions they want to do.
But I met a problem that my script can only read one input and then do one action.
Is it possible to let my script to run more than one... (2 Replies)
Discussion started by: kaiya
2 Replies
6. Shell Programming and Scripting
Hi experts,
I am totally stuck with this.
I run a looping "for" command for multiple directories, manually, I have done this :
vfor dir in A B; do
cp -p $dir/X.txt X-${dir}.txt
done
where A and B is directory name.
However, I need to run for many directories.
So I have tried this :... (7 Replies)
Discussion started by: guns
7 Replies
7. Shell Programming and Scripting
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
Discussion started by: Straitsfan
25 Replies
8. UNIX for Dummies Questions & Answers
hi Gurus,
I'm a newbie in scripting please check my script if this is correct. I think there's something wrong with it but I;m not sure. I'm trying to create multiple lines using awk from external xml files but i want to add additonal info in the data manually
Since i don't knwo how to... (0 Replies)
Discussion started by: sexyTrojan
0 Replies
9. Shell Programming and Scripting
hi all
im working in tcsh shell.
In sh shell i write for example:
case in $www
1 | 2 | 3)
arguments;;
4 | 5 | 6)
arguments;;
esac
can anybody tell me the equivalent to tcsh of
1 | 2 | 3)? (2 Replies)
Discussion started by: micromicrin
2 Replies
10. Programming
Hi,
This is the first time, i am doing UNIX & C stuff.
I have written one funtion like
#include <stdio.h>
seq(num)
int num;
{
int i,sum;
for (i=1; i<=num;i++)
sum+=i;
return(sum);
}
this seq funtion should have return values to unix script.
like
.. (4 Replies)
Discussion started by: sundarm
4 Replies