What is the output of echo *


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers What is the output of echo *
# 1  
Old 06-29-2007
What is the output of echo *

Hi all,

Kindly let me know the output of echo * command.
# 2  
Old 06-29-2007
Quote:
Originally Posted by shailja
Hi all,

Kindly let me know the output of echo * command.
List out all the files in the directory
Code:
$ echo *
SNMP1 SNMP2 a a.s b b.s f f1 f2 ff ff1 ff2 file m s ss tmp tmp1 x a
$ set -f
$ echo *
*
$ set +f
$ echo *
SNMP1 SNMP2 a a.s b b.s f f1 f2 ff ff1 ff2 file m s ss tmp tmp1 x a

-f Disable wildcard expansion
# 3  
Old 06-29-2007
Hi,

Thanks for the reply. But I have one query, echo * displays only files in the current working directory or files and directories in the current working directory.
# 4  
Old 06-29-2007
Quote:
But I have one query, echo * displays only files in the current working directory or files and directories in the current working directory.
Files and directory both !!
kamitsin
# 5  
Old 06-29-2007
Quote:
Originally Posted by shailja
Hi,

Thanks for the reply. But I have one query, echo * displays only files in the current working directory or files and directories in the current working directory.
everything - the easiest way to find out is to try it.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Echo's strange output

Hi, Kindly help me to understand the behavior or logic of the below shell command $ echo $!# echo $echo $ $ $ echo !$# echo $# 0 I am using GNU bash, version 3.2.25(1)-release (2 Replies)
Discussion started by: royalibrahim
2 Replies

2. Shell Programming and Scripting

Echo output from command

Hello i am trying to do some calculation from output command for example ls -l if then echo "error" else echo "$" fi its something like this which get strings from output command and try to sum total lines of this string if exceed certain number it display error if not it... (3 Replies)
Discussion started by: mogabr
3 Replies

3. Shell Programming and Scripting

sorting output of echo

can someone please tell me who to sort the numerical output of echo? UIO="8180 0 0 0 0 0 0 0 0 0 0 48240 48240 48240 48240 48240 48240 0 0 0 0 0 0 0 48300 0 0 0 48300" echo $UIO | sort -n This doesn't workk. it does not sort the numbers from smallest to highest. any ideas? (2 Replies)
Discussion started by: SkySmart
2 Replies

4. Shell Programming and Scripting

Need help in echo output

Hi All, I have code to get the UUID and capacity for the LUN from CX -arry. I need the output in this format LUN Number UUID Space in MB LUN 238 60:06:01:60:C2:56:11:00:28:36:67:59:11:04:DE:11 122880 But Now iam getting this... (3 Replies)
Discussion started by: ranjancom2000
3 Replies

5. Shell Programming and Scripting

formatting output using echo

i have the following script: while ;do b=${ARRAY2} i=0 while ;do a=${ARRAY1} fin=`echo $a - $b | bc` echo -e "${fin}," >> try ((i++)) ((k++)) done echo -n >> try #add statement to format output here #printf "\t" >> try #echo -e '\t' >> nik ((j++)) echo $j (3 Replies)
Discussion started by: npatwardhan
3 Replies

6. Shell Programming and Scripting

Output of both the echo statement in one line

I have script like echo -n FINISHED FEXP: ${TABLE2EXP} echo $STATUS I want the output of both the echo statement in one line How can i do this (3 Replies)
Discussion started by: scorp_rahul23
3 Replies

7. Shell Programming and Scripting

weird echo output?

#!/bin/bash INPUT=$1 if then INPUT=0$1 TRACKNUMBER=$INPUT fi TRACKNUMBER=$INPUT echo "Track Number:" $TRACKNUMBER if then echo "File Does Not Exist!: split-track"${TRACKNUMBER}".wav" exit 0 fi CUEFILE="$2" (6 Replies)
Discussion started by: TinCanFury
6 Replies

8. Shell Programming and Scripting

piping output to echo

Hi, I was wondering why ls * | echo does not print the contents of the directory to the screen? The way I see it, ls * returns a whole lot of information, and then we pipe all this info to echo, so surely it should all come to our screen! Is there a serious flaw in my understanding? ... (3 Replies)
Discussion started by: A1977
3 Replies

9. UNIX for Dummies Questions & Answers

How do I output or echo NONE if grep does not find anything?

I am performing a grep command and I need to know how to echo "NONE" or "0" to my file if grep does not find what i am looking for. echo What i found >> My_File grep "SOMETHING" >> My_File I am sure this is easy, I am sort of new at this! Thanks (2 Replies)
Discussion started by: jojojmac5
2 Replies

10. Shell Programming and Scripting

Store output and Echo

I will admit I am a newbie but I am trying to write some simple scripts Situation: I have a list of IP Addresses that I want to once or 2 times a day store the average ping response time in a database (mysql) I am part way there but not all the way there I have the following cat ./slow... (2 Replies)
Discussion started by: meyerder
2 Replies
Login or Register to Ask a Question