Sponsored Content
Full Discussion: Echo not working with $
Top Forums Shell Programming and Scripting Echo not working with $ Post 302949838 by RudiC on Thursday 16th of July 2015 01:03:25 PM
Old 07-16-2015
Assumed that PATH1 and PATH2 WERE defined, it still wouldn't work as it would need a second expansion by the shell after $I or $v have been expanded. You need to use eval for that, but this can be dangerous and is generally disadvised.
These 2 Users Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Echo working funny

Hello, this is my first post and question. I have search before for this problem but didn't find anything similar. My case: I have a string inside the variable string1 like this: string1="lala lele lili lolo lulu" When I do echo of it, it appears like this: echo $string1 lala lele lili... (8 Replies)
Discussion started by: hemtar
8 Replies

2. Shell Programming and Scripting

Difference between using "echo" builtin and /bin/echo

So in my shell i execute: { while true; do echo string; sleep 1; done } | read line This waits one second and returns. But { while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly. I have tried this in bash as well as zsh,... (2 Replies)
Discussion started by: ulidtko
2 Replies

3. UNIX for Dummies Questions & Answers

How to correctly use an echo inside an echo?

Bit of a weird one i suppose, i want to use an echo inside an echo... For example... i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos... echo "echo "hello"" >$file echo "echo "goodbye"" >$file ... (3 Replies)
Discussion started by: mokachoka
3 Replies

4. UNIX for Dummies Questions & Answers

Is echo $variable >> text.txt working in MacOSX?

Hi New at this, but want to learn more. I'm trying this as an Shell Command in MacOSX; newdate='<TIME>' echo $newdate >> /Users/ttadmin/Desktop/test.txt And it don't work. But if I just use; echo <TIME> >> /Users/ttadmin/Desktop/test.txt (<TIME> is an variable that one program... (6 Replies)
Discussion started by: jackt
6 Replies

5. Shell Programming and Scripting

why the set rr='echo string|cut not working

I am new to the c shell script, can you let me know why the set rr= is not working. C shell script #! /bin/csh Set tt= 12345_UMR_BH452_3_2.txt set rr='echo $tt | cut –d”_” -f1' syntax error (4 Replies)
Discussion started by: jdsignature88
4 Replies

6. Shell Programming and Scripting

With that logic this echoes "echo". Question about echo!

echo `echo ` doesn't echoes anything. And it's logic. But echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo" (too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies

7. Shell Programming and Scripting

echo is not working as expected

for i in `cat /export/home/afahmed/Arrvial_time.txt` do echo $i echo $i | awk '$3 < $D { print $4 }' >> dynamic_DF.txt; done When i echo, its echo as Nov 15 02:24 /export/home/pp_adm/inbound//wwallet_20111115.txt where i expect it to be Nov 15 02:24... (7 Replies)
Discussion started by: afahmed
7 Replies

8. Shell Programming and Scripting

echo two variables like the paste command is not working

Dear all, I have two files like this file1 A B C D E F file2 1,2 3,4 5,6 I want this output output_expected A B 1,2 C D 3,4 E F 5,6 (3 Replies)
Discussion started by: valente
3 Replies

9. Shell Programming and Scripting

Echo command not working in the script

HI I have and echo command which works perfectly in the shell but when i execute in the script it gives me an error code query is as below QUERY=`echo "Select Severity,Dupl_count,Creation_Time,Last_Received,Node_Name,Node_Name,Object,Message_Group,Message_Text,Last_Annotation from " \ ... (2 Replies)
Discussion started by: Jcpratap
2 Replies

10. Shell Programming and Scripting

Disk Space Utilization in HTML format working in one environment and not working on the other

Hi Team, I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system. df -h | awk -v host=`hostname` ' BEGIN { print "<table border="4"... (13 Replies)
Discussion started by: Harihsun
13 Replies
GIT-STATUS(1)							    Git Manual							     GIT-STATUS(1)

NAME
git-status - Show the working tree status SYNOPSIS
git status [<options>...] [--] [<pathspec>...] DESCRIPTION
Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by git (and are not ignored by gitignore(5)). The first are what you would commit by running git commit; the second and third are what you could commit by running git add before running git commit. OPTIONS
-s, --short Give the output in the short-format. --porcelain Give the output in a stable, easy-to-parse format for scripts. Currently this is identical to --short output, but is guaranteed not to change in the future, making it safe for scripts. -u[<mode>], --untracked-files[=<mode>] Show untracked files (Default: all). The mode parameter is optional, and is used to specify the handling of untracked files. The possible options are: o no - Show no untracked files o normal - Shows untracked files and directories o all - Also shows individual files in untracked directories. See git-config(1) for configuration variable used to change the default for when the option is not specified. -z Terminate entries with NUL, instead of LF. This implies the --porcelain output format if no other format is given. OUTPUT
The output from this command is designed to be used as a commit template comment, and all the output lines are prefixed with #. The default, long format, is designed to be human readable, verbose and descriptive. They are subject to change in any time. The paths mentioned in the output, unlike many other git commands, are made relative to the current directory if you are working in a subdirectory (this is on purpose, to help cutting and pasting). See the status.relativePaths config option below. In short-format, the status of each path is shown as XY PATH1 -> PATH2 where PATH1 is the path in the HEAD, and ` -> PATH2` part is shown only when PATH1 corresponds to a different path in the index/worktree (i.e. the file is renamed). The XY is a two-letter status code. The fields (including the ->) are separated from each other by a single space. If a filename contains whitespace or other nonprintable characters, that field will be quoted in the manner of a C string literal: surrounded by ASCII double quote (34) characters, and with interior special characters backslash-escaped. For paths with merge conflicts, X and Y show the modification states of each side of the merge. For paths that do not have merge conflicts, X shows the status of the index, and Y shows the status of the work tree. For untracked paths, XY are ??. Other status codes can be interpreted as follows: o ' ' = unmodified o M = modified o A = added o D = deleted o R = renamed o C = copied o U = updated but unmerged Ignored files are not listed. X Y Meaning ------------------------------------------------- [MD] not updated M [ MD] updated in index A [ MD] added to index D [ M] deleted from index R [ MD] renamed in index C [ MD] copied in index [MARC] index and work tree matches [ MARC] M work tree changed since index [ MARC] D deleted in work tree ------------------------------------------------- D D unmerged, both deleted A U unmerged, added by us U D unmerged, deleted by them U A unmerged, added by them D U unmerged, deleted by us A A unmerged, both added U U unmerged, both modified ------------------------------------------------- ? ? untracked ------------------------------------------------- There is an alternate -z format recommended for machine parsing. In that format, the status field is the same, but some other things change. First, the -> is omitted from rename entries and the field order is reversed (e.g from -> to becomes to from). Second, a NUL (ASCII 0) follows each filename, replacing space as a field separator and the terminating newline (but a space still separates the status field from the first filename). Third, filenames containing special characters are not specially formatted; no quoting or backslash-escaping is performed. CONFIGURATION
The command honors color.status (or status.color -- they mean the same thing and the latter is kept for backward compatibility) and color.status.<slot> configuration variables to colorize its output. If the config variable status.relativePaths is set to false, then all paths shown are relative to the repository root, not to the current directory. If status.submodulesummary is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled for the long format and a summary of commits for modified submodules will be shown (see --summary-limit option of git- submodule(1)). SEE ALSO
gitignore(5) AUTHOR
Written by Junio C Hamano <gitster@pobox.com[1]>. DOCUMENTATION
Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org[2]>. GIT
Part of the git(1) suite NOTES
1. gitster@pobox.com mailto:gitster@pobox.com 2. git@vger.kernel.org mailto:git@vger.kernel.org Git 1.7.1 07/05/2010 GIT-STATUS(1)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy