07-25-2006
concat string
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 returns "HELLO WORLD ", why???
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do I concat a date to a filename
eg;
filename: jjjrtup
to become
jjjrtup29052002
mv jjjrtup jjjrtup ? date
what should ? be (2 Replies)
Discussion started by: drukkie
2 Replies
2. Shell Programming and Scripting
HI all,
How to concat two strings in Shell scrpits
suppose
x=a
y=b
i want to display it as
ab
How to do it ?
Thanks.. (1 Reply)
Discussion started by: dhananjaysk
1 Replies
3. 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
4. UNIX for Dummies Questions & Answers
Hi All,
I hope you can help. i am concatenating String variables using the following method.
command="$command$x"
i have created a script which takes a set of args passed to the script using the $*
#example script
args=$*
count=0
for x in $args
do
count=`expr $count + 1`
... (8 Replies)
Discussion started by: duke
8 Replies
5. Shell Programming and Scripting
Hi All
this may be somewhere in internet , but couldnt find the it.
i have file as
abc01
2010-07-01 12:45:24
2010-07-01 12:54:35
abc02
2010-07-01 12:59:24
2010-07-01 01:05:13
abc03
.
.
.
the output using awk should look like this
abc01|2010-07-01 12:45:24|2010-07-01 12:54:35... (3 Replies)
Discussion started by: posner
3 Replies
6. Shell Programming and Scripting
Hi All,
My Input file contains:
Input.txt
Name|Marks
ABC|10
GHI|10
JKL|20
MNO|20
PQR|30
Output.txt
MARKS|NAME
10|ABC,GHI
20|JKL,MNO
30|PQR
Thanks in advance (4 Replies)
Discussion started by: kmsekhar
4 Replies
7. Shell Programming and Scripting
Hello All,
I have a file with following data.
1365787116 3.0 contracts/Procs_Val_Req_forContrct_Amnd_BPEL
1348791394 2.0 contracts/Procs_Val_toTerm_Ret_Contrct_BPEL
1348791394 2.0 contracts/Qualfy_BP_forNew_Ret_Contrct_BPEL
1348791394 2.0 ... (8 Replies)
Discussion started by: Vikram_Tanwar12
8 Replies
8. 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
9. Shell Programming and Scripting
Hi,
I need help to combine the first 7 character of firstname if it is longer than 7and combine with the first character of lastname.
ex: username lastname => usernaml
user lastname => userl
Thanks in advance. (10 Replies)
Discussion started by: xitrum
10 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
LEARN ABOUT DEBIAN
cxxtestgen
CXXTESTGEN(1) User Manual CXXTESTGEN(1)
NAME
cxxtestgen - Generates test source files for CxxTest
SYNOPSIS
cxxtestgen [options] [-o output] <file> ...
DESCRIPTION
This script parses the files provided and generates an output source file that can be build with traditional compiler to produce the test-
runner executable.
OPTIONS
-h
--help Show help message and exit.
--version
Write the CxxTest version.
-o NAME
--output=NAME
Write output to file NAME.
-w WORLD
--world=WORLD
The label of the tests, used to name the XML results.
--include=HEADER
Include file HEADER in the test runner before other headers.
--abort-on-fail
Abort tests on failed asserts (like xUnit).
--main=MAIN
Specify an alternative name for the main() function.
--headers=FILENAME
Specify a filename that contains a list of header files that are processed to generate a test runner.
--runner=CLASS
Create a test runner that processes test events using the class CxxTest::CLASS.
The currently available runners are:
- ErrorPrinter This is the standard error printer, which formats its output to the standard output stream (std::cout). Same as
--error-printer.
- ParenPrinter Identical to ErrorPrinter except that it prints line numbers in parantheses. This is the way Visual Studio expects
it.
- StdioPrinter The same as ErrorPrinter except that it uses printf instead of std::cout.
- XmlPrinter Print test results to an XML file.
- XUnitPrinter This test listener generates output using both ErrorPrinter and XmlPrinter. Same as --xunit-printer.
--gui=CLASS
Create a GUI test runner that processes test events using the class CxxTest::CLASS. (deprecated)
--error-printer
Create a test runner using the ErrorPrinter class, and allow the use of the standard library.
--xunit-printer
Create a test runner using the XUnitPrinter class.
--xunit-file=XUNIT-FILE
The file to which the XML summary is written for test runners using the XUnitPrinter class. The default XML filename is
TEST-<WORLD>.xml, where <WORLD> is the value of the --world option. (default: cxxtest)
--have-std
Use the standard library (even if not found in tests).
--no-std
Do not use standard library (even if found in tests).
--have-eh
Use exception handling (even if not found in tests).
--no-eh
Do not use exception handling (even if found in tests).
--longlong=TYPE
Use TYPE as for long long integers. The default is for 'no' long long integer type to be specified, which is consistent with the
current C++ standard.
--no-static-init
Do not rely on static initialization in the test runner.
--template=TEMPLATE
Generate the test runner using file TEMPLATE to define a template.
--root Write the main() function and global data for a test runner.
--part Write the tester classes for a test runner.
-f
--fog-parser
Use new FOG C++ parser (Python 2.7 is required).
COPYRIGHT
Copyright (C) 2008 Sandia Corporation
This software is distributed under the LGPL License v2.1 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
Government retains certain rights in this software
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
CxxTest generator version 4 2012-01-06 CXXTESTGEN(1)