shell scripting
From the given input file i want the output (shown below) which is the values of statements starting with Haripin loop and Muti-loop in each structure with its dG no. In input file they are shown in bold case. (original input file is a big one consists of n structures with n statements in this form only)HELP FOR SHELL SCRIPTING IS APPRECIATED. THANKS IN ADVANCE.
General format of output:
Output
Input file
Last edited by Scott; 10-24-2010 at 10:57 AM..
Reason: Added code tags, removed formatting. Please use a descriptive subject
I modified as u suggested but it giving error like this
Modified program is given here
---------- Post updated at 04:48 PM ---------- Previous update was at 03:55 PM ----------
The code is working (given below) and executed with original data. A small correction is required. In origianl data file the dG number statement will be generated like this
b Initial dG = -25.10 (i.e. one space from the beginning of the statement; so it is not coming on the output. The input cant change because it is automatically generated. In program make modification to print dG number if it is starting after one space from the beginning. If this statement is from the beginning of the line, the dG value is printing)
In the output, after printing each sequence '-e' is printing. that has to be removed (shown below)
The modified code is like this
--------------------------------
----------------------------------------
Output after run the program (original data output partial)
Last edited by Scott; 10-24-2010 at 06:05 PM..
Reason: Please use code tags
This means the output of program $INFILE is presented as a file. Using backticks instead means the output of program $INFILE is presented as a variable.
Correct would be:
---------- Post updated at 01:42 ---------- Previous update was at 01:39 ----------
Quote:
Originally Posted by kswapnadevi
In line3 of the program I placed the file name as
INFILE= sai (here sai is my input file)
and run the shell program with 'sh t1prog'
it is giving error as
line 21: $INFILE: ambiguous redirect
You have a space between INFILE= and sai. There should be no space there.
This User Gave Thanks to Scrutinizer For This Post:
Hi there
please have a look at the code..i want to create Using a named pipe. Run a find in the background starting in the working directory
While this is happening wait for input from the user to ask him which file to find.
If the user does not enter any data in 10 seconds ask the user again.... (1 Reply)
Hi, if in a network there are lots of PCs connected with either windows or linux as operating system.Then what will be the shell script for the same and also if the PC has linux in it then we have to find if it is occupied or unoccupied.
If the PC has windows in it then we have to find if it is... (6 Replies)
Hey I have a data in the file named as outputFile.txt. The data is in the format
123456,12345678912345,400,09/09/09,INACTIVE.
I want this output without commas ie
12345612345678912345400090909INACTIVE.
Please tell me what to do and clear explain all the terms, as I am new to it. (6 Replies)
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
I just upgraded to Android 2.2 from 2.1. The GPS issue that was troublesome in 2.1 seems to have been fixed. Some of web browsing seems faster, but it could just be my connection is better today ;) Flash works in some browsers but not very good and it is too slow for Flash apps designed for... (0 Replies)
Hi all,
I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first.
Can you please help me determine which one to... (14 Replies)
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)