In single quotes you must not \escape the \escape:
The shell removes the 'single quotes' and the "double quotes" before it invokes the loopissue.sh. The quotes are only the hint to pass it as one string - to $1 in the loopissue.sh.
Also the following works (and is even better portable, because the \n must be interpreted by the echo command):
Is there a reason to squeeze all arguments into one $1?
Maybe you can simply use
This maps to $1 $2 $3 in the loopissue.sh
And it's simple to print them in different formats:
Note that for dirpath is short for for dirpath in "$@". In other words, a for loop defaults to loop thru all arguments.
The arguments passed to the script come from the database in the format I shared and cannot be changed hence the proposed solution would not work.
Is there a way to replace all \\n to single whitespace as requested in the original post?
Hi
! /bin/sh
set logdir1 "logDir/local/logname"
#write the filename into a file
echo $logdir1 >> logname.txt
how do i exec the above echo command (1 Reply)
Hi there,
I have a wapper script which passes the argument from command prompt to inner script.. It works fine as long as the argument containing single word. But when value contains multiple word with space, not working as expected. I tried my best, couldn't find the reason. Gurus, pls.... (2 Replies)
Hi,
I am trying to write a script to cleanup files in a log directory ..
cd log
find Datk** -mtime +7 -exec rm -f {} \; 2> /dev/null
Have used the above to clean up files in log directory more then 7 days older.
The file can be something like ( auto-generate by some processes and... (2 Replies)
Hi,
I have a script output.sh which produces the following output (as an example):
"abc def" "ghi jkl"
This output should be handled from script input.sh as input and the quotes should be treated as variable delimiters but not as regular characters.
input.sh (processing positional... (2 Replies)
Hi i have written a shell script that takes only single ip address from the user and calculates its latency and reliability, can you please tell me that what should be done if i want that user should enter 100 or 1000 ip address (5 Replies)
Hi All,
I am new to this forum and also shell script :)
My task is I have to read CSV file get the data from the file and use the data to call c executable with data as argument.And the output from c executable should be stored to new CSV file
Please find below my code
testfunction() {... (14 Replies)
Hi,
I want to change a file file1.txt:
1234
3456
2345
6789
3456
2333
4444
As, file2.txt in Linux:
'1234','3456','2345','6789','3456','2333','4444'
Could someone please help me. (Single liner sed, awk will be welcome!) (7 Replies)
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Hi all,
i am new to this forum, unix and shell scripting.
I would really appreciate if you all can help me here..
I have files coming in the below format
'filename20513'13May06:03:45
filename are characters..
like 'ABDDUT20513'13May06:03:45
i need it to be renamed as... (17 Replies)
Discussion started by: khman
17 Replies
LEARN ABOUT OPENSOLARIS
rmvb
rmvb(9F) Kernel Functions for Drivers rmvb(9F)NAME
rmvb - remove a message block from a message
SYNOPSIS
#include <sys/stream.h>
mblk_t *rmvb(mblk_t *mp, mblk_t *bp);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
mp Message from which a block is to be removed. mblk_t is an instance of the msgb(9S) structure.
bp Message block to be removed.
DESCRIPTION
The rmvb() function removes a message block (bp) from a message (mp), and returns a pointer to the altered message. The message block is
not freed, merely removed from the message. It is the module or driver's responsibility to free the message block.
RETURN VALUES
If successful, a pointer to the message (minus the removed block) is returned. The pointer is NULL if bp was the only block of the message
before rmvb() was called. If the designated message block (bp) does not exist, -1 is returned.
CONTEXT
The rmvb() function can be called from user, interrupt, or kernel context.
EXAMPLES
This routine removes all zero-length M_DATA message blocks from the given message. For each message block in the message, save the next
message block (line 10). If the current message block is of type M_DATA and has no data in its buffer (line 11), then remove it from the
message (line 12) and free it (line 13). In either case, continue with the next message block in the message (line 16).
1 void
2 xxclean(mp)
3 mblk_t *mp;
4 {
5 mblk_t *tmp;
6 mblk_t *nmp;
7
8 tmp = mp;
9 while (tmp) {
10 nmp = tmp->b_cont;
11 if ((tmp->b_datap->db_type == M_DATA) &&
(tmp->b_rptr == tmp->b_wptr)) {
12 (void) rmvb(mp, tmp);
13 freeb(tmp);
14 }
15 tmp = nmp;
16 }
17 }
SEE ALSO freeb(9F), msgb(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.11 16 Jan 2006 rmvb(9F)