Sponsored Content
Top Forums UNIX for Advanced & Expert Users AIX sed use space as delimiter Post 303044229 by apmcd47 on Monday 17th of February 2020 04:30:58 AM
Old 02-17-2020
Quote:
Originally Posted by MadeInGermany
In tr the number of characters in arg1 should match the number in arg2 - otherwise the behavior is not possible.
Convert directly to newline:
Code:
tr -s ' ,!' '\n\n\n' < filename

Okay, sorry about that. I've gotten used to the GNU tr which does allow that behaviour. Now I've checked with Solaris I see your're right.

Andrew
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace space with delimiter in whole file -perl

Hi I have a file which have say about 100,000 records.. the records in it look like Some kind of text 1234567891 abcd February 14, 2008 03:58:54 AM lmnop This is how it looks.. if u notice there is a 2byte space between each column.. and im planning to replace that with '|' .. ... (11 Replies)
Discussion started by: meghana
11 Replies

2. UNIX for Dummies Questions & Answers

replacing space with pipe(delimiter)

Hello All, I have a file with thousands of records: eg: |000222|123456987|||||||AARONSON| JOHN P|||PRIMARY |P |000111|567894521|||||||ATHENS| WILLIAM k|||AAAA|L Expected: |000222|123456987|||||||AARONSON| JOHN |P|||PRIMARY |P |000111|567894521|||||||ATHENS| WILLIAM |k|||AAAA|L I... (6 Replies)
Discussion started by: OSD
6 Replies

3. UNIX for Dummies Questions & Answers

Problem Using Cut With A Space Delimiter

I am trying to extract 'postmaster' from the following string: PenaltyError:=554 5.7.1 Error, send your mail to postmaster@LOCALDOMAIN using the following command: cat /usr/share/assp/assp.cfg | grep ^PenaltyError:= | cut -d '@' -f1 | cut -f8 but it returns: PenaltyError:=554 5.7.1 Error,... (10 Replies)
Discussion started by: cleanden
10 Replies

4. UNIX for Dummies Questions & Answers

Delimiter: Tab or Space?

Hello, Is there a direct command to check if the delimiter in your file is a tab or a space? And how can they be converted from one to another. Thanks, G (4 Replies)
Discussion started by: Gussifinknottle
4 Replies

5. Shell Programming and Scripting

comma delimiter and space

I have a csv file and there is a problem which I need to resolve. Column1,Column2,Colum3,Column4 ,x,y,z ,d,c,v t,l,m,n ,h,s,k ,k,,y z,j, ,p Now if you see column1 for row 1 and row 4 though they are null there is a space but in case of row2 and row 5 there is no space. I want row... (3 Replies)
Discussion started by: RubinPat
3 Replies

6. Shell Programming and Scripting

Problem in extraction when space is a field delimiter

I have more than 1000 files to parse. Each file contains few lines (number of lines varies) followed by a header line having all column's name (SPOT, NAME etc) and then values for those columns. **Example File: sdgafh dfhaadfha sfgaf dhah jkthdj SPOT NAME GENE_NAME CH_MEAN CHDN_MED ... (11 Replies)
Discussion started by: AshwaniSharma09
11 Replies

7. Shell Programming and Scripting

Space as a delimiter

not sure if i'm doing this right i'm new tho this but i'm trying to use a space as a delimiter with the cut command my code is size=$( du -k -S -s /home/cmik | cut -d' ' -f1 ) i've also tried -f2 and switching the -d and -f around if that does anything (3 Replies)
Discussion started by: Cmik
3 Replies

8. Shell Programming and Scripting

using a another delimiter with sed?

Hi there, After lots of reading I figured out how to use sed to parse my file. This file is called services.txt: 00a1:ffff0000:0018:01f4:1:477 BravaNL 00a2:ffff0000:0018:01f4:1:471 MAX 00a3:ffff0000:000b:01f4:1:390 HaberTürk... (5 Replies)
Discussion started by: MastaG
5 Replies

9. Shell Programming and Scripting

Need next line as a space delimiter in awk

Hi,Below is the output for p3fi_dev services 1/app/oracle> . ./oraprofile_p3fi_dev p3fi_dev_01 (P):/devoragridcn_01/app/oracle> srvctl config service -d p3fi_dev p3fi_p3fi_dev.world PREF: p3fi_dev_01 AVAIL: p3fi_dev_02 pplnet_p3fidev PREF: p3fi_dev_01 AVAIL: p3fi_dev_02 nexus_p3fidev PREF:... (3 Replies)
Discussion started by: Vishal_dba
3 Replies

10. Shell Programming and Scripting

Need to use delimiter as : and space in awk

Hi , Please suggest me how do I use : (colon and one space) as a delimiter in awk Best regards, Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies
XCALL(9)						   BSD Kernel Developer's Manual						  XCALL(9)

NAME
xcall, xc_broadcast, xc_unicast, xc_wait -- cross-call interface SYNOPSIS
#include <sys/xcall.h> typedef void (*xcfunc_t)(void *, void *); uint64_t xc_broadcast(u_int flags, xcfunc_t func, void *arg1, void *arg2); uint64_t xc_unicast(u_int flags, xcfunc_t func, void *arg1, void *arg2, struct cpu_info *ci); void xc_wait(uint64_t where); DESCRIPTION
The machine-independent xcall interface allows any CPU in the system to request that an arbitrary function be executed on any other CPU. Sometimes it is necessary to modify hardware state that is tied directly to individual CPUs (such as a CPU's local timer), and these updates can not be done remotely by another CPU. The LWP requesting the update may be unable to guarantee that it will be running on the CPU where the update must occur, when the update occurs. Additionally, it is sometimes necessary to modify per-CPU software state from a remote CPU. Where these update operations are so rare or the access to the per-CPU data so frequent that the cost of using locking or atomic operations to provide coherency is prohibitive, another way must be found. Cross calls help to solve these types of problem. However, since this facility is heavyweight, it is expected that it will not be used often. xcall provides a mechanism for making ``low priority'' cross calls. The function to be executed runs on the remote CPU within a thread con- text, and not from a software interrupt, so it can ensure that it is not interrupting other code running on the CPU, and so has exclusive access to the CPU. Keep in mind that unless disabled, it may cause a kernel preemption. xcall also provides a mechanism for making ``high priority'' cross calls. The function to be executed runs on the remote CPU within a IPL_SOFTCLOCK software interrupt context, possibly interrupting other lower-priority code running on the CPU. NOTES
Functions being called should be relatively lightweight. They may block on locks, but carefully and minimally, to not interfere with other cross calls in the system. FUNCTIONS
xc_broadcast(flags, func, arg1, arg2) Call (*func)(arg1, arg2) on all CPUs in the system. Return a uint64_t ``ticket'' to xc_wait() on for the cross-call to complete. flags should be XC_HIGHPRI for a "high priority" call, and 0 for a "low priority" call. xc_broadcast() should not be called from interrupt context. xc_unicast(flags, func, arg1, arg2, ci) Like xc_broadcast(), but call (*func)() on only the CPU indicated by ci. xc_unicast() also returns a ``ticket''. xc_wait(where) Wait on the ``ticket'' returned by a prior xc_broadcast() or xc_unicast() for the corresponding cross-call to complete. xc_wait() should be called from a thread context. CODE REFERENCES
The xcall interface is implemented within the file sys/kern/subr_xcall.c. SEE ALSO
kpreempt(9), percpu(9) HISTORY
The xcall interface first appeared in NetBSD 5.0. AUTHORS
Andrew Doran <ad@NetBSD.org> BSD
October 24, 2011 BSD
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy