11-03-2014
It's there. Try double quotes: echo "$dat2"
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
2. Shell Programming and Scripting
Hi,
I need to insert space between words on my output in UNIX other than the single space given by the space bar on my keyboard, e.g
when are you going. (There should be 4 spaces between each of these words)
rather than
when are you going
Can anyone help me with... (3 Replies)
Discussion started by: divroro12
3 Replies
3. Shell Programming and Scripting
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies
4. Programming
Hello,
Can anyone tell me that,
How can I assign variable to shell script variable, which i need to use in INSERT INTO statement?
my shell script variables are,
EMPNAME=`regular expression`
EMPID=`regular expression`
EMPBDATE=`regular expression`
Now through ksh script I am... (16 Replies)
Discussion started by: Poonamol
16 Replies
5. Shell Programming and Scripting
How can I assign a variable to an variable. IE $car=honda
One way I can do it is export $car=honda
or
let $car=2323
Is there any other ways to preform this task (3 Replies)
Discussion started by: 3junior
3 Replies
6. Shell Programming and Scripting
Hi Folks,
I am trying to make a script to assign all diskspace to slice 0, on multiple sized disks. Since the disks are new they may need to be labelled also to avoid the error: Cannot get disk geometry
Below is my code struggling with logic which doesn't seem to be producing the desired... (0 Replies)
Discussion started by: momin
0 Replies
7. Shell Programming and Scripting
I have the following texts in a .txt file,
22/02 23/02 24/02 25/02 26/02
Bike speed (kmph) 004 004 004 004 004
22/02 23/02 24/02 25/02 26/02
Bike speed (kmph) 004 007 007 007 011
I am trying to export it to .csv by doing
cat nic.txt > nic.csv
22/02 23/02 are date and this has to... (7 Replies)
Discussion started by: nicolethomson
7 Replies
8. Shell Programming and Scripting
Hi everyone,
I want help to insert space between digits and letters in a alphanumeric string.
INPUT
TRY234TER
PHY1TYR
EXPECTED OUTPUT
TRY 234 TER
PHY 1 TYR
The lines always begin with the letters and the alphabets will be a three letter combination before and after the number. The... (2 Replies)
Discussion started by: kaav06
2 Replies
9. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
10. UNIX for Beginners Questions & Answers
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
LEARN ABOUT NETBSD
prop_data
PROP_DATA(3) BSD Library Functions Manual PROP_DATA(3)
NAME
prop_data, prop_data_create_data, prop_data_create_data_nocopy, prop_data_copy, prop_data_size, prop_data_data, prop_data_data_nocopy,
prop_data_equals, prop_data_equals_data -- opaque data value property object
LIBRARY
Property Container Object Library (libprop, -lprop)
SYNOPSIS
#include <prop/proplib.h>
prop_data_t
prop_data_create_data(const void *blob, size_t len);
prop_data_t
prop_data_create_data_nocopy(const void *blob, size_t len);
prop_data_t
prop_data_copy(prop_data_t data);
size_t
prop_data_size(prop_data_t data);
void *
prop_data_data(prop_data_t data);
const void *
prop_data_data_nocopy(prop_data_t data);
bool
prop_data_equals(prop_data_t dat1, prop_data_t dat2);
bool
prop_data_equals_data(prop_data_t data, const void *blob, size_t len);
DESCRIPTION
The prop_data family of functions operate on an opaque data value property object type.
prop_data_create_data(const void *blob, size_t len)
Create a data object that contains a copy of blob with size len. Returns NULL on failure.
prop_data_create_data_nocopy(const void *blob, size_t len)
Create a data object that contains a reference to blob with size len. Returns NULL on failure.
prop_data_copy(prop_data_t data)
Copy a data object. If the data object being copied is an external data reference, then the copy also references the same external
data. Returns NULL on failure.
prop_data_size(prop_data_t data)
Returns the size of the data object. If the supplied object isn't a data object, zero is returned.
prop_data_data(prop_data_t data)
Returns a copy of the data object's contents. The caller is responsible for freeing the returned buffer. If the supplied object
isn't a data object or if the data container is empty, NULL is returned.
In user space, the buffer is allocated using malloc(3). In the kernel, the buffer is allocated using malloc(9) using the malloc type
M_TEMP.
prop_data_data_nocopy(prop_data_t data)
Returns an immutable reference to the contents of the data object. If the supplied object isn't a data object, NULL is returned.
prop_data_equals(prop_data_t dat1, prop_data_t dat2)
Returns true if the two data objects are equivalent. If at least one of the supplied objects isn't a data object, false is returned.
prop_data_equals_data(prop_data_t data, const void *blob, size_t len)
Returns true if the data object's value is equivalent to blob with size len. If the supplied object isn't a data object, false is
returned.
SEE ALSO
prop_array(3), prop_bool(3), prop_dictionary(3), prop_number(3), prop_object(3), prop_string(3), proplib(3)
HISTORY
The proplib property container object library first appeared in NetBSD 4.0.
BSD
April 22, 2006 BSD