Sponsored Content
Top Forums Shell Programming and Scripting perform echo and awk inside a string Post 302596673 by balajesuri on Wednesday 8th of February 2012 02:23:02 AM
Old 02-08-2012
Either way is fine. Backticks are used in post #2.. $() will work equally well.
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Appending string (charachters inside the line) to a fixed width file using awk or sed

Source File: abcdefghijklmnop01qrstuvwxyz abcdefghijklmnop02qrstuvwxyz abcdefghijklmnop03qrstuvwxyz abcdefghijklmnop04qrstuvwxyz abcdefghijklmnop05qrstuvwxyz Whatever characters are in 17-18 on each line of the file, it should be concatenated to the same line at the character number... (6 Replies)
Discussion started by: tamahomekarasu
6 Replies

3. UNIX for Dummies Questions & Answers

How to perform string replace in shell script?

I have value like ABCDEF,BBCCDD in a shell variable, now i would like to have ABQWEF,BBQWDD in the same shell variable. How can i replace the char at position 3&4 with QW in shell script? (3 Replies)
Discussion started by: vel4ever
3 Replies

4. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

5. Shell Programming and Scripting

Urgent - Search a string inside awk

I need to search for string which is formed from the awk input file in a file given as input through -v option. I tried using the while (getline filename) and match(). But this approach is consuming lot of time as the input file has thousands of records. Please suggest any alternative. Thanks! (0 Replies)
Discussion started by: Cool
0 Replies

6. Shell Programming and Scripting

Unable to echo single quotes inside awk

# 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)
Discussion started by: proactiveaditya
2 Replies

7. Shell Programming and Scripting

Using echo to print arguments inside a function

I am using echo in bash. Have created a function prargv which takes a number of arguments. Example: prargv "-e" "--examples" Inside prargv, I want to print all the arguments using echo echo "$@" This returns --examples rather than -e --examples" This problem can be fixed... (3 Replies)
Discussion started by: kristinu
3 Replies

8. UNIX for Beginners Questions & Answers

String has * as the field delimiter and I need echo/awk to escape it, how?

Hi, I am trying to read an Oracle listener log file line by line and need to separate the lines into several fields. The field delimiter for the line happens to be an asterisk. I have the script below to start with but when running it, the echo command is globbing it to include other... (13 Replies)
Discussion started by: newbie_01
13 Replies

9. Shell Programming and Scripting

Gnu tool; sed awk echo etc to prepend or append string to a file

Looking to add text to a file, example File example; nodegroups: check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com I need to take a file with a one line list of hosts separated by commas host.domain.com,host2.domain.com,host3.domain.comand prepend the string " ... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies

10. UNIX for Beginners Questions & Answers

sed inside the awk script to replace a string in the array

The requirement is i need to find an array value matching with pattern {5:{ , replace that with 5: and reassign that to same array index and print it. I write something like below and the issue is sed command is not working. If i replace " with "`" the script gives syntax error.how can i... (8 Replies)
Discussion started by: bhagya123
8 Replies
RDMA_POST_UD_SEND(3)					   Librdmacm Programmer's Manual				      RDMA_POST_UD_SEND(3)

NAME
rdma_post_ud_send - post a work request to send a datagram. SYNOPSIS
#include <rdma/rdma_verbs.h> int rdma_post_ud_send (struct rdma_cm_id *id, void *context, void *addr, size_t length, struct ibv_mr *mr, int flags, struct ibv_ah *ah, uint32_t remote_qpn); ARGUMENTS
id A reference to a communication identifier where the message buffer will be posted. context User-defined context associated with the request. addr The address of the memory buffer to post. length The length of the memory buffer. mr Optional registered memory region associated with the posted buffer. flags Optional flags used to control the send operation. ah An address handle describing the address of the remote node. remote_qpn The number of the destination queue pair. DESCRIPTION
Posts a work request to the send queue of the queue pair associated with the rdma_cm_id. The contents of the posted buffer will be sent to the specified destination queue pair. RETURN VALUE
Returns 0 on success, or -1 on error. If an error occurs, errno will be set to indicate the failure reason. NOTES
The user is responsible for ensuring that the destination queue pair has queued a receive request before issuing the send operations. For a list of supported flags, see ibv_post_send. Unless the send request is using inline data, the message buffer must have been registered before being posted, with the mr parameter referencing the registration. The buffer must remain registered until the send completes. The user-defined context associated with the send request will be returned to the user through the work completion wr_id, work request identifier, field. SEE ALSO
rdma_cm(7), rdma_connect(3), rdma_accept(3), rdma_reg_msgs(3) ibv_post_send(3), rdma_post_recv(3) librdmacm 2010-07-19 RDMA_POST_UD_SEND(3)
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy