I'm not very familiar with the ssh command. When I tried to set a variable and then echo its value on a remote machine via ssh, I found a problem. For example,
$ ITSME=itsme
$ ssh xxx.xxxx.xxx.xxx "ITSME=itsyou; echo $ITSME"
itsme
$ ssh xxx.xxxx.xxx.xxx 'ITSME=itsyou; echo $ITSME'
itsyou
$... (3 Replies)
Hi guys, I have a sed line in double quotes which works fine, but I want it to be in single quotes
here is the sed line
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/"
can some one give the equivalent to the above script in single quotes
Thanks a ton (5 Replies)
Unix superusers,
I am new to unix but would like to learn more about grep. I am very familiar with regular expressions as i have used them for searching text files in windows based text editors. Since I am not very familiar with Unix, I dont understand when one should use GREP with the... (2 Replies)
Hi I want to replace single quote with two single quotes in a perl string.
If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
Hello. I'm trying to write a bash script that uses GNU screen and have hit a brick wall that has cost me many hours... (I'm sure it has something to do with quoting/globbing, which is why I post it here)
I can make a script that does the following just fine:
test.sh:
#!/bin/bash
# make... (2 Replies)
Hi i have to insert the below line into a specific line number of another file
export MBR_CNT_PRCP_TYPE_CODES_DEL="'01','02','04','05','49','55','UNK'"
I have passed the above line to a variable say ins_line. I have used below command to perform the insert
awk 'NR==3{print "'"${ins_line}"'"}1'... (1 Reply)
I need to interpolate a shell variable in a code, i cannot share the exact code so this is an example i made up to describe the situation
What I am trying to do here is try to wrap up the value of a variable in single quotes. This value needs to be passed to another program which would only... (4 Replies)
# echo 'export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk '{print \$1}')' >> new_file
#
# cat new_file
export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk {print $1})
#
Now how to echo the quotes around the... (2 Replies)
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
I'm trying to change "F" to "G" in lines after the first one:
'FUE.SER' 5
1 1 F0501 F0401 F0502
2 1 F0301 E0501 F0201 E0502 F0302
3 1 F0503 E0503 E0301 E0201 E0302 E0504 F0504
4 1 F0402 F0202 E0202 F0101 E0203 F0203 F0403
5 1 F0505 E0505 E0303 E0204 E0304 E0506... (10 Replies)
Discussion started by: larrl
10 Replies
LEARN ABOUT ULTRIX
hcreate
hsearch(3) Library Functions Manual hsearch(3)Name
hsearch, hcreate, hdestroy - manage hash search tables
Syntax
#include <search.h>
ENTRY *hsearch (item, action)
ENTRY item;
ACTION action;
int hcreate (nel)
unsigned nel;
void hdestroy ( )
Description
The subroutine is a hash-table search routine generalized from Knuth (6.4) Algorithm D. It returns a pointer into a hash table indicating
the location at which an entry can be found. The item is a structure of type ENTRY (defined in the <search.h> header file) containing two
pointers: item.key points to the comparison key, and item.data points to any other data to be associated with that key. (Pointers to types
other than character should be cast to pointer-to-character.) The action is a member of an enumeration type ACTION indicating the disposi-
tion of the entry if it cannot be found in the table. ENTER indicates that the item should be inserted in the table at an appropriate
point. FIND indicates that no entry should be made. Unsuccessful resolution is indicated by the return of a NULL pointer.
The subroutine allocates sufficient space for the table, and must be called before is used. The nel is an estimate of the maximum number
of entries that the table will contain. This number may be adjusted upward by the algorithm in order to obtain certain mathematically
favorable circumstances.
The subroutine destroys the search table, and may be followed by another call to
Restrictions
Only one hash search table may be active at any given time.
Diagnostics
The subroutine returns a NULL pointer if either the action is FIND and the item could not be found or the action is ENTER and the table is
full.
The subroutine returns zero if it cannot allocate sufficient space for the table.
See Alsobsearch(3), lsearch(3), string(3), tsearch(3)hsearch(3)