07-23-2008
Hi era,
I have noticed that
echo $@
or
echo $*
seem to remove the quotes from the arguments in the scripts. Is there a away to keep this
i.e example script
example this is an "example" test
echo $* or $@
echo's
this is an "example" test
rather than
this is an example test
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hey,
I want to concat whole bunch of strings together but somehow they don't turn out the way I want them to
a="HELLO "
b="WORLD "
c=$a$b
I was expecting c to be "HELLO WORLD " but it... (1 Reply)
Discussion started by: mpang_
1 Replies
2. Programming
This is a simple question...
char *str = NULL;
int num = 0;
scanf ("%d", &num);
str = ???
I want str to point to the string num.txt
For e.g: If user enters num = 5,
str should point to "5.txt"
How do I do that ?
Thanks (2 Replies)
Discussion started by: the_learner
2 Replies
3. Shell Programming and Scripting
I have a line in multiple scripts:select into table /dir1/dir2/file.dat
dir1 and dir2 are the same but file.dat is different from script to script.
I need to include /dir1/dir2/file.dat into double quotes in each file of my directory:select into table "/dir1/dir2/file.dat" (13 Replies)
Discussion started by: surfer515
13 Replies
4. Shell Programming and Scripting
I have a script which I call and pass a text string to it. This string is then is assigned to a variable in the script. I then call another script and pass that variable to the second script, but when I do, the quotes are lost and the second script gets a total of three variables 'my', 'lovely' and... (3 Replies)
Discussion started by: iskatel
3 Replies
5. Shell Programming and Scripting
I'm a beginner with shell and tried to do this per hours and everytinhg gives different want i do.
So
I have a lot of file in *.csv ( a.csv, b.csv ...)
in each file csv , it has some fields separeted by commas.
-----
"joseph";"21","m";"groups";"j.j@gmail.com,j.j2@hotmail.com"... (6 Replies)
Discussion started by: flaviof
6 Replies
6. Shell Programming and Scripting
Hi,
Need to capture a string between 1st & last quote.
String can be anything like
a b "c" d e
Output: c
a "b c" d e
Output: b c
a "b c" d "e" f
Output: b c d e
sed 's/.*"\(.*\)".*/\1/g'
Above helps me to find the string between last quote.
Need to find the string between 1st &... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies
7. Shell Programming and Scripting
I have thousands of files in a directory. I need to find/list all files that have the below matching string -
RETURNCODE: "1017"
Thank you! (5 Replies)
Discussion started by: esmgr
5 Replies
8. Shell Programming and Scripting
Hi all,
Here is the data file:
- want to match only lan3 in the output .
- not lan3:1
file :
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""... (2 Replies)
Discussion started by: rveri
2 Replies
9. Shell Programming and Scripting
Here is the structure of my file:
MyFile.txt
g-4.n.g.fr 10.147.243.63 g-4.n.g.fr-w1
Here is my sript:
test.sh
#! /bin/sh
ip=10.147.243.63
worker=$(grep -e $ip $1 | awk '{ print $3; }')
echo ""
echo $worker
echo ""
echo $worker
echo ""
echo "$worker.v.1"
echo... (7 Replies)
Discussion started by: chercheur111
7 Replies
10. Shell Programming and Scripting
Hello!
#!/usr/bin/env python
hn = "simsa-svr"
for container in containerslist:
Name = container
I want to print Name along with hn i,e simsa-svr. I tried like Name = container'-'.join(hn) did not work.
Needed result: lilly2232321-simsa-svr (2 Replies)
Discussion started by: ashokvpp
2 Replies
list(3tcl) Tcl Built-In Commands list(3tcl)
__________________________________________________________________________________________________________________________________________________
NAME
list - Create a list
SYNOPSIS
list ?arg arg ...?
_________________________________________________________________
DESCRIPTION
This command returns a list comprised of all the args, or an empty string if no args are specified. Braces and backslashes get added as
necessary, so that the lindex command may be used on the result to re-extract the original arguments, and also so that eval may be used to
execute the resulting list, with arg1 comprising the command's name and the other args comprising its arguments. List produces slightly
different results than concat: concat removes one level of grouping before forming the list, while list works directly from the original
arguments.
EXAMPLE
The command
list a b "c d e " " f {g h}"
will return
a b {c d e } { f {g h}}
while concat with the same arguments will return
a b c d e f {g h}
SEE ALSO
lappend(3tcl), lindex(3tcl), linsert(3tcl), llength(3tcl), lrange(3tcl), lrepeat(3tcl), lreplace(3tcl), lsearch(3tcl), lset(3tcl), |
lsort(3tcl)
KEYWORDS
element, list
Tcl list(3tcl)