awk script for automating the other commercial software command lines


 
Thread Tools Search this Thread
Top Forums Programming awk script for automating the other commercial software command lines
# 15  
Old 12-01-2012
Hi Don

I am sorry I didnt get what i should do now.

I dont knw what I should change in this

Code:
/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/Balaji/Desktop/grace-5.1.12/src:/home/Balaji/Desktop/smap_v2_0:/home/Balaji/Desktop/weblogo:/home/Balaji/Desktop/openeye_progrms/openeye/bin:/home/Balaji/vmd-1.9.1/bin/vmd:/home/Balaji/bin:/home/Balaji/moe2011/bin

Could you please advice and explain me.

Many Thanks
Balaji
# 16  
Old 12-01-2012
Since bash seems to be your login shell, there should be one or more lines in one of the three files:
Code:
$HOME/.bash_profile
$HOME/.bash_login
    or
$HOME/.profile

that starts with:
Code:
export PATH=

or a line that starts with
Code:
PATH=

and another line that starts with
Code:
export

and contains PATH in the list of words following export. For each of these three files that contains a command that sets PATH, comment out those lines by inserting an octothorpe (#) at the start of the line and add the following line after the first newly commented line:
Code:
export PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/Balaji/Desktop/grace-5.1.12/src:/home/Balaji/Desktop/smap_v2_0:/home/Balaji/Desktop/weblogo:/home/Balaji/Desktop/openeye_progrms/openeye/bin:/home/Balaji/vmd-1.9.1/bin/vmd:/home/Balaji/bin:/home/Balaji/moe2011/bin

This should just need to be done in one of the above three files, but I have no idea how you have set up your environment. After editing those three files:
  1. Log out,
  2. log in again, and
  3. try running the command:
    Code:
    ksh eon_run.sh

    again.
# 17  
Old 12-02-2012
Hi Don

Thanks for advice.

I changed the above things in .bashrc file, logged out and after login tried

Code:
ksh eon_run.sh


It shows error as

Code:
eon is a tracked alias for /home/Balaji/Desktop/openeye_progrms/openeye/bin/eon

Kindly advice.

Many Thanks

Balaji
# 18  
Old 12-02-2012
Quote:
Originally Posted by bala06
Hi Don

Thanks for advice.

I changed the above things in .bashrc file, logged out and after login tried

Code:
ksh eon_run.sh


It shows error as

Code:
eon is a tracked alias for /home/Balaji/Desktop/openeye_progrms/openeye/bin/eon

Kindly advice.

Many Thanks

Balaji
That is not an error. It just means that you left the command:
Code:
type eon

in eon_run.sh.

It also means that you didn't remove the alias for eon, but that shouldn't affect the running of eon_run.sh.
# 19  
Old 12-02-2012
Hi Don

In the script, I kept the line.

Code:
#!/bin/ksh
echo $eon
type eon
ksh eon_run.sh


for file in shape_eon_input_[1-9].oeb.gz shape_eon_input_[1-9][[0-9].oeb.gz shape_eon_input_[1-9][0-9][0-9].oeb.gz
do      seq=${file##*_}
        seq=${seq%%.*}
        eon -dbase $file -besthits 47500 -prefix Eon-seq
done

Kindly check the script. i'm using.

Please advice.

Many Thanks
Balaji
# 20  
Old 12-02-2012
Use the script I gave you in message #2 in this thread:
Code:
#!/bin/ksh
for file in shape_eon_input_[1-9].oeb.gz shape_eon_input_[1-9][[0-9].oeb.gz shape_eon_input_[1-9][0-9][0-9].oeb.gz
do      seq=${file##*_}
        seq=${seq%%.*}
        eon -dbase $file -besthits 47000 -prefix Eon-$seq
done

# 21  
Old 12-02-2012
Hi Don

Thanks a lot for your patience, suggestions and help.

The scripts works.

Many Thanks
Balaji
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to put the command to remove duplicate lines in my awk script?

I create a CGI in bash/html. My awk script looks like : echo "<table>" for fn in /var/www/cgi-bin/LPAR_MAP/*; do echo "<td>" echo "<PRE>" awk -F',|;' -v test="$test" ' NR==1 { split(FILENAME ,a,""); } $0 ~ test { if(!header++){ ... (12 Replies)
Discussion started by: Tim2424
12 Replies

2. Windows & DOS: Issues & Discussions

Automating an UNIX Based Software Package on Windows

The company I am with is using Oracle Supply Chain Planing 8.12.1 with JDE 8.12. This is a Unix based system running on Windows Servers using Hummingbird Exceed Version 14 for interactive processing We are currently attempting to automate the Advance Planning Agent flows on a couple of... (2 Replies)
Discussion started by: pfaloney
2 Replies

3. Shell Programming and Scripting

awk command to find seq lines

I have a below file FILE.cfg JAN_01 VAR1=4 VAR2=SUM VAR3=PRIVATE JAN_10 VAR1=44 VAR2=GUN VAR3=NATUR JAN_20 VAR1=3 VAR2=TQN VAR3=COMMA code: (JAN_10 is argument passed from script) (6 Replies)
Discussion started by: Roozo
6 Replies

4. Shell Programming and Scripting

Issues with automating SFTP command

Hi All, I am currently looking at automating the steps that I follow to download log files from putty to desktop. I connect to a client's machine through citrix desktop. I am required to download quite a number of application logs to identfiy the issues in production. Steps that is being... (3 Replies)
Discussion started by: krackjack84
3 Replies

5. Shell Programming and Scripting

AWK Command to duplicate lines in a file?

Hi, I have a file with date in it like: UserString1 UserString2 UserString3 UserString4 UserString5 I need two entries for each line so it reads like UserString1 UserString1 UserString2 UserString2 etc. Can someone help me with the awk command please? Thanks (4 Replies)
Discussion started by: Grueben
4 Replies

6. Shell Programming and Scripting

awk command in script gives error while same awk command at prompt runs fine: Why?

Hello all, Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val: > cat getnon0file.sh #!/bin/bash this="getnon0file.sh" USAGE=$this" InFile="xyz.38" Min="0.05" # awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies

7. Shell Programming and Scripting

Automating 'newgrp' command - how?

Hi, I have to add the 'newgrp' command to my login (.cshrc) script. The problem is that if I add it, it comes to infinite look, since newgrp opens new shell again and again. How to automate the newgrp when I have to login, and avoid that loop? Currently I'm thinking of a condition that... (2 Replies)
Discussion started by: moshmosh
2 Replies

8. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

9. Shell Programming and Scripting

Automating Logform Command in a script

Hi all I am trying to create a script to automate the creating of filesystems. The problem I am having is as follows:- After creating the Log Logical Volume, I want to format it, using the logform command. The Logform command expects user intervention, by typing 'y' and 'enter' to continue.... (2 Replies)
Discussion started by: TheDoc
2 Replies

10. Shell Programming and Scripting

How to run awk command having multiple lines

Hi, Can u see the code below. set xyz = `cat testt1.txt | awk '/-----/{\ print $1 }\ ' | tail -1` I need to execute it in c shell . What is wrong with the above command. When i write everything on a single line then it is working. Can anybody help me . (0 Replies)
Discussion started by: nani_g
0 Replies
Login or Register to Ask a Question