10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
2. Shell Programming and Scripting
I am writing a script where I need awk to test if two columns are the same and shell to do something if they are or are not.
Here is the code I'm working with:
@ test = 0
...
test = `awk '{if($1!=$2) print 1; else print 0}' time_test.tmp`
#time_test.tmp holds two values separated by a space... (3 Replies)
Discussion started by: Malavin
3 Replies
3. Shell Programming and Scripting
Hi,
I have a variable which stores file names as a result of find command. I need to delete all these files one by one, i.e. by a loop. Can anyone tell me how can it be done?
The variable f2d has the file names like these
abc.txt
bcd.txt
fff.txt
gef.txt
Now I have used a loop as... (12 Replies)
Discussion started by: jhilmil
12 Replies
4. Shell Programming and Scripting
Hi ,
can I pass more then one variable to awk using -v option? (4 Replies)
Discussion started by: Anupam_Halder
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
My script will take 3 i/p's from user. Now i need to pass these 3 values to remote server. Please find my code.
while
do
echo " To which server you want to connect ? "
echo " 1. server1 \n"
echo " 2. server2 \n"
read opt_server
if
then
echo "enter the... (2 Replies)
Discussion started by: sree143reddy
2 Replies
6. Shell Programming and Scripting
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Discussion started by: Diya123
1 Replies
7. Programming
I know multiple values can be returned from a function in C like this:
char **read_file ( char * , unsigned long int * );//this is the function prototypeunsigned long int number_of_words = 0;//variable defined in main() and initialized to 0words_from_dictionary = read_file ( "dictionary.dit" ,... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
8. Shell Programming and Scripting
Hi,
I have a situation where I have to specify a different value to an awk command, I beleive i have the gist of this done, however I am not able to get this correct. Here is what I have so far
echo $id
065859555
This value occurs in a "pipe" delimited file in postition 8. Hence I would... (1 Reply)
Discussion started by: jerardfjay
1 Replies
9. UNIX for Dummies Questions & Answers
one of my colleagues has this question.
he has a command, C_CMD which accepts 4 variables, $1 $2 $3 $4
he wants to load up a file with multiple rows, one row per set of variables and then iteratively execute the command based on the content of the file.
example:
at the command line you'd... (5 Replies)
Discussion started by: LisaS
5 Replies
10. UNIX for Advanced & Expert Users
UNIX script running a SQR program.... no problem passing values to SQR program... trying to pass values back to UNIX....
I'm currently creating a file from the SQR program and then using the Unix READ command to read the file and retrieve the value....
Is there an easier way to pass the... (2 Replies)
Discussion started by: seeuinoz
2 Replies