Visit Our UNIX and Linux User Community

Full Discussion: Problem with echo *
Top Forums Shell Programming and Scripting Problem with echo * Post 302338119 by jim mcnamara on Monday 27th of July 2009 06:06:19 AM
Old 07-27-2009
You have to turn off globbing during the call to the script
Code:
set -f
myscript.sh * ___* *
set +f

Or surround the arguments with tics to prevent globbing
Code:
myscript.sh '*'  '___*'  '*'

 
Test Your Knowledge in Computers #478
Difficulty: Medium
The first commercially available TB hard drive was released in 2005.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

`echo` problem.

Have the following lines in a script: echo "-----------------------------------------------"\ "---------------------" >> $xdfrpt echo "- Date - - / - /stand - /u - /u1 - /u2 -"\ "/x1 - /x2 - /x3 -" >> $xdfrpt echo... (1 Reply)
Discussion started by: Cameron
1 Replies

2. Shell Programming and Scripting

echo problem

Hi, I have given the following statement in a script to put the values of variables (VAR1, VAR2,...) in a file. echo " $VAR1 $VAR2 $VAR3 $VAR4 $VAR5" >> filename But the output is not coming properly. Variables VAR5, VAR4 are replacing the first (VAR1, VAR2,..). I can't... (5 Replies)
Discussion started by: abrd600
5 Replies

3. Shell Programming and Scripting

echo variable problem

hi I have say five variable. I would ask the user which one they want me to print and then print accordingly. TEST_1='10.2.3.4' TEST_2='11.2.3.5' TEST_3='12.2.3.5' TEST_4='13.2.3.5' TEST_5='14.2.3.5' print_var() { echo "Accessing var num $1" echo TEST$1 #??? But How do... (6 Replies)
Discussion started by: sabina
6 Replies

4. Shell Programming and Scripting

echo problem

echo "XXXXX" >> /xx/output.txt cat /xx/file.txt| awk '{tony=tony+$1+$2; print tony/$3*100}' >> /xx/output.txt Dear all, In this situation i will have 2 lines in the output file. What i want is to have only one output line. e.g: XXXXX "value" HOW to put the output of the "cat and awk" in... (1 Reply)
Discussion started by: tontal
1 Replies

5. UNIX for Dummies Questions & Answers

echo $ problem

Hi I am using tcsh. I want display in a file_1 like this. $VARIBALE I gave in a termianl > echo "\$VARIBALE" > file_1 Its not workning. It was giving VARIBALE: Undefined variable. I gave \ before $, but why it was giving undefined varible? Please help me. Thanks in advance (4 Replies)
Discussion started by: chaitubek
4 Replies

6. Shell Programming and Scripting

echo problem

hi all i have little problem below is my shell script a=`sqlplus fss_cst/fss_cst@dolp1 << EOF SET PAGESIZE 0 FEEDBACK OFF TRIMOUT ON; select process from lfs$ta_process where valid_to_dat=to_date('9/16/2010','mm/dd/yyyy'); EOF` echo ${SQL} the script name is test2.sh when i execute... (5 Replies)
Discussion started by: aishsimplesweet
5 Replies

7. Shell Programming and Scripting

Double echo problem

I'm parsing a router configuration file and printing out some of the fields. Given the following output, I'd like to add the filename to the first column. I'm definately a neophyte in scripting. COUNTER=${#array1 } while ; do ######## echo -n $JUNOS_FILE | ... (3 Replies)
Discussion started by: nocleader
3 Replies

8. Shell Programming and Scripting

echo display problem

Hi I am facing a strange problem a=03 echo ${a} the output is 3 But i want to display it is 03 Can you people help me how to display it like 03. Thanks (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

9. Shell Programming and Scripting

Simple echo problem

Hey all! I'm in an intro to UNIX class at university, and we've just began writing scripts. Naturally I can't get it to do what I want. Basic script as follows: COMPARE1=`ls|wc -l` tar czf archive.tgz ~/path/to/file COMPARE2=`tar tvzf archive.tgz|wc -l` if then ... (7 Replies)
Discussion started by: nickzourdos
7 Replies

10. Shell Programming and Scripting

Problem with echo command

I am trying to get ascii file using echo command, e.g. - echo "\050" It is correctly working on RHEL 4 but not in RHEL 5. Please help me to fix the issue. ## Working as expected in RHEL 4 $ lsb_release -d Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 8) $ echo... (4 Replies)
Discussion started by: atanubanerji
4 Replies
App::Asciio(3pm)					User Contributed Perl Documentation					  App::Asciio(3pm)

NAME
App::Asciio - Plain ASCII diagram | | | | | | | | | | | | | | | | v | v | v | v v v _____ _____ / _ / __ \_ ___ ___ _ _ -----> __ / __ / ___/ / -----> /\__, / \___' \_ \_ \_/\____/ \____/ \_ \_ \_____ /_//_//___/ /___/ /_//_//_____/ | | | | | | | | | | | v | | | v | | | v | | | v | | v v v (\_/) (O.o) ASCII world domination is near! (> <) SYNOPSIS
$> perl asciio.pl DESCRIPTION
This gtk2-perl application allows you to draw ASCII diagrams in a modern (but simple) graphical application. The ASCII graphs can be saved as ASCII or in a format that allows you to modify them later. Thanks to all the Perl-QA hackathon 2008 in Oslo for pushing me to do an early release. Special thanks go to the Muppet and the gtk-perl group, Gabor Szabo for his help and advices. Adam Kennedy coined the cool name. Sometimes a diagram is worth a lot of text in a source code file. It has always been painfull to do ASCII diagrams by hand. DOCUMENTATION
Asciio user interface .-----------------------------------------------------------------. | Asciio | |-----------------------------------------------------------------| | ............................................................... | | ..............-------------..------------..--------------...... | | .............| stencils > || asciio > || box |..... | | .............| Rulers > || computer > || text |..... | | .............| File > || people > || wirl_arrow |..... | grid---------->.......'-------------'| divers > || axis |..... | | ............................'------------'| boxes > |..... | | ......................^...................| rulers > |..... | | ......................|...................'--------------'..... | | ......................|........................................ | | ......................|........................................ | | ......................|........................................ | | ......................|........................................ | '-----------------------|-----------------------------------------' | | context menu context menu The context menu allows to access to asciio commands. ASCII is used to insert ASCII elements. keyboard shortcuts All the keyboad commands definitions can be found under asciio/setup/actions/. Among the commands implemented are: o select all o delete o undo o group/ungroup o open / save o local clipboard operations A window displaying the currently available commands is displayed if you press K. elements There but a few elements implemented at the moment. wirl arrow An arrow that tries to do what you want. Try rotating the end clockwise then counter clockwise to see how it acts ^ | | --------. | | '------- | | O-------------X / | / | / | / v / / v box and text Both are implemented within the same code. Try double clicking on a box to see what you can do with it. .----------. | title | .----------. |----------| ************ | | | body 1 | * * '----------' | body 2 | ************ '----------' anything in a box (\_/) | edit_me (O.o) <------------' (> <) your own stencils Take a look at setup/stencils/computer for a stencil example. Stencils lites in setup/setup.ini will be loaded when Asciio starts. your own element type For simple elemnts, put your design in a box. that should cover 90% of anyone's needs. You can look in lib/stripes for element implementation examples. exporting to ASCII You can export to a file in ASCII format but using the .txt extension. Exporting to the clipboard is done with ctl + e. EXAMPLES
User code ^ ^ OS code / / / User code <----Mode----->OS code / / / User code v v OS code .---. .---. .---. .---. .---. .---. OS API '---' '---' '---' '---' '---' '---' | | | | | | v v | v | v .------------. | .-----------. | .-----. | Filesystem | | | Scheduler | | | MMU | '------------' | '-----------' | '-----' | | | | v | | v .----. | | .---------. | IO |<----' | | Network | '----' | '---------' | | | v v v .---------------------------------------. | HAL | '---------------------------------------' .---------. .---------. | State 1 | | State 2 | '---------' '---------' ^ ^ / / / / / / / / / v v ****** ****** ****** * T1 * * T2 * * T3 * ****** ****** ****** ^ ^ / / / / stimuli / v .---------. '--------| State 3 | '---------' DEPENDENCIES
gnome libraries, gtk, gtk-perl, perl BUGS AND LIMITATIONS
Undoubtedly many as I wrote this as a fun little project where I used no design nor 'methodic' whatsoever. AUTHOR
Khemir Nadim ibn Hamouda CPAN ID: NKH mailto:nadim@khemir.net LICENSE AND COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SUPPORTED OSes Gentoo I run gentoo, packages to install gtk-perl exist. Install Ascii with cpan. FreeBSD FreeBSD users can now install asciio either by package: $ pkg_add -r asciio or from source (out of the ports system) by: $ cd /usr/ports/graphics/asciio $ make install clean Thanks to Emanuel Haupt. Ubuntu and Debian Ports are on the way. Windows AsciiO is part of camelbox and can be found here: <http://code.google.com/p/camelbox/>. Install, run AsciiO from the 'bin' directory. .-------------------------------. / /| / camelbox for win32 / | / / | / / | .-------------------------------. | | ______\_, | | | (_. _ o_ _/ | | | '-' \_. / | | | / / | | | / / .--. .--. | | | ( ( / '' / '' " | | | \_.' ) | | | || _ './ | | | | ___.' / | | | '-./ .' |/ | | | | / )| | | | |/ // \ | . | | __// \__ | / | //\ /__/ mrf\__| | / | .--_/ \_--. | / | /__/ \__ |/ '-------------------------------' camelbox is a great distribution for windows. I hope it will merge with X-berry series of Perl distributions. Mac OsX This works too (and I have screenshots to prove it :). I don't own a mac and the mac user hasn't send me how to do it yet. other unices YMMV, install gtk-perl and AsciiO from cpan. SEE ALSO
http://www.jave.de http://search.cpan.org/~osfameron/Text-JavE-0.0.2/JavE.pm http://ditaa.sourceforge.net/ http://www.codeproject.com/KB/macros/codeplotter.aspx http://search.cpan.org/~jpierce/Text-FIGlet-1.06/FIGlet.pm http://www.fossildraw.com/?gclid=CLanxZXxoJECFRYYEAodnBS8Dg (doesn't always respond) http://www.ascii-art.de (used some entries as base for the network stencil) http://c2.com/cgi/wiki?UmlAsciiArt http://www.textfiles.com/art/ http://www2.b3ta.com/_bunny/texbunny.gif *o_ _o/* / * * < *o/* /> ) o/* / > *o < /> __o */ /* o__ * /> < * /* __o_ _o__ */ * / * * * < /> *o/* ejm97 __)__ perl v5.10.1 2010-04-25 App::Asciio(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 09:18 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy