Sponsored Content
Top Forums Shell Programming and Scripting Run bash command inside zsh script Post 302927437 by kamcamonty on Wednesday 3rd of December 2014 01:52:34 AM
Old 12-03-2014
Question Run bash command inside zsh script

Hi,
I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh).

I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory
" eve though I merged the whole code into one line.
Could anyone help?

Code:
bases=`echo A T G C` 

for c1 in $bases
do
    for c2 in $bases 
    do
        for c3 in $bases
        do
        echo $c1$c2$c3
done
done
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run the command inside perl script

I have a command which will run fine in a unix command prompt. Can you tell how to interprete this command inside perl script...... The command is : perl -pe 's/(\|333\}.*)\}$/$1|1.6}/' FIA.txt This will search for the number 333 and appends 1.6 at the end of that line....... (1 Reply)
Discussion started by: vinay123
1 Replies

2. Shell Programming and Scripting

ZSH - '.zlogout' not being run on exit

Hi, I have a problem with '.zlogout' not being run on Solaris 10. Here's whats happening. I remotely log in from a PC running Cygwin/X using a local xterm window and ssh to start a remote 'zsh' shell, version 4.2.5, on a Solaris 10 server. The Server has KDE installed but as a Window... (0 Replies)
Discussion started by: stv_t
0 Replies

3. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

4. Shell Programming and Scripting

Preserve extented ascii character when run echo comand inside bash script

Hi everyone, I'm echo some text with extended ascii characters as below: echo -e "Pr\xE9sentation du spectacle" > output or echo -e "Présentation du spectacle" > outputIf I open the file created I see this text Présentation du spectacleThe text is shown correctly in this created file when... (7 Replies)
Discussion started by: Ophiuchus
7 Replies

5. Shell Programming and Scripting

Bash- Command run from script does not pass full parameters with spaces inside

There's a JavaScript file that I call from command line (there's a framework) like so: ./RunDiag.js param1:'string one here' param2:'string two here' I have a shell script where I invoke the above command. I can run it in a script as simple as this #!/bin/bash stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies

6. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

7. Shell Programming and Scripting

Listen sharp time to run a command inside a script

Hello, Just wondered if there is any possibility to run a command at sharp time inside a script in linux. My question is not about crontab Example: #!/bin/bash cd /home/database for i in * do command 1 if time is 19:00, day is Monday then run command2 if time is 20:00, day is... (10 Replies)
Discussion started by: baris35
10 Replies

8. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies

9. Shell Programming and Scripting

Executing sed command inside a bash script

I want to run commands inside a bash script. An example is I want to pass the command in a string as regexp as an argument to the script, then run sed on the bash variable sed.sh regexp sed.sh "-i \"s/<p>//g\"" then call sed "$regexp" $fl (3 Replies)
Discussion started by: Kangol
3 Replies

10. UNIX for Advanced & Expert Users

Run awk command inside ssh

I am trying to run an awk command inside of ssh and it is not working. These are AIX servers. for i in `cat servers`; do ssh $i "/bin/hostname; df -g | awk '/dev/ && $4+0 > 70'"; done server1 server2 server3 server4 I also tried these two methods and they did not work. It just seemed... (5 Replies)
Discussion started by: cokedude
5 Replies
HLINS(1)						      General Commands Manual							  HLINS(1)

NAME
hlins - insert url's into html documents SYNOPSIS
hlins [options] [infile] DESCRIPTION
hlins is a program that inserts hypertext links into html documents, according to one or several data bases associating addresses (url's) to names. hlins is designed for inserting links for persons: It knows about abbreviations of first and middle names and tolerated dropping of the last part of a composite last name. If no file argument is given then input is taken from stdin; when no output option (see below) is given then output goes to stdout. For a complete description, see the documention in html format. OPTIONS
hlins follows the usual GNU command line syntax, with long options starting with two dashes (`--'). -o, --output-file file Write to file instead of standard output -h, --help Show a summary of options. -v, --version Show the version of the program. -q, --quiet Surpress diagnostic output. -db, --data-bases files ... Use files ... as data bases -m, --modify files ... Dont't act as filter but perform in-pace modifications of files. -R, --recursive Recursively descend into directories and act on all files with names ending on .html. -td, --tmp-dir dir Use directory dir to create temporary files. --db-to-html List the address data bases in HTML format to stdout. ENVIRONMENT
TMPDIR default directory for creating temporay files. VERSION
This manual pages describes version 0.39. SEE ALSO
The full documentation with examples should be available in /usr/share/doc/hlins/. See also the hlins home page http://www.lsv.ens-cachan.fr/~treinen/hlins/. AUTHOR
Ralf Treinen <treinen@debian.org>. July 25, 2000 HLINS(1)
All times are GMT -4. The time now is 01:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy