Sponsored Content
Full Discussion: GNU sed running on Mac
Top Forums Shell Programming and Scripting GNU sed running on Mac Post 303024385 by RudiC on Sunday 7th of October 2018 06:01:06 PM
Old 10-07-2018
Quote:
Originally Posted by Xterra
. . . when I run sed '1i>sometext, . . .

The absence of a second single quote makes it difficult to guess what exactly you want to do - a redirection, or inserting a <-gt> sign plus sometext?
Howsoever, for insertion, the man page says sed wants a "backslash <new line>" combination - try this and report back.
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

running linux ppc on a mac 7200

running linux ppc on a mac 7200... can someone please tell me how to do this... it says something about a red hat installer?? (2 Replies)
Discussion started by: ignus
2 Replies

2. UNIX for Dummies Questions & Answers

Running Terminal and/or X-Windows in Mac OS X

Quick question: When I load up Terminal or X-Windows on my Mac, and the prompt comes up...what folder am I starting in? (2 Replies)
Discussion started by: liquidcross
2 Replies

3. Shell Programming and Scripting

gnu sed regex grouping not working?

Hello, from the gnu sed manual, I should be able to do this: `\(REGEXP\)' Groups the inner REGEXP as a whole, this is used to: * Apply postfix operators, like `\(abcd\)*': this will search for zero or more whole sequences of `abcd', while `abcd*' ... (3 Replies)
Discussion started by: Allasso
3 Replies

4. Shell Programming and Scripting

gnu sed replace space with new line

please help in making sed singleline command i need to insert dos new line (CR LF) before " 34 matching device(s) found on \\cpu1." " 6 matching device(s) found on \\cpu7." " 102 matching device(s) found on \\mainserver." the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Discussion started by: xserg
1 Replies

5. UNIX for Dummies Questions & Answers

Is GNU sed installed?

Hi there, I'm new to UNIX and have the following question: At work a Solaris Unix system is used. I'm not sure if they have gnu sed installed so I tried using the command "sed -r" and got the error: "Illegal option --r" Does this mean that gnu sed is definitely not installed on the system... (8 Replies)
Discussion started by: js8765
8 Replies

6. OS X (Apple)

GNU Sed Problem

Hi, I'm and Android developer using Mac OSX 10.7. I use Dsixda's Android Kitchen to develop my roms. I had it working fine on 10.6.8 and it still worked flawlessly when updating to 10.7. I installed Macports, and installed some packages, and then tried to run the Android Kitchen. I CD'd to the... (3 Replies)
Discussion started by: dmeadows013
3 Replies

7. Shell Programming and Scripting

Unexpected results with lists in GNU sed

I have been living with this problem with GNU sed v4.1.4 for a long time, but now I really need to figure it out. When using a list in either an address or a search, the expression is matching lower and upper-case letters. works as it should. For example, if I run sed -nr "// p"... (7 Replies)
Discussion started by: nctrader
7 Replies

8. Shell Programming and Scripting

Insert @Line # - SED (non-GNU)

Just posted on another fellow's question using ed, but I wanted to know about doing it with sed on Unix. For example - I have a file of an unknown length, but I want to add a line after the shell declaration (Line 2). If possible, I'd like the example to be able to just substitute in a number and... (2 Replies)
Discussion started by: Vryali
2 Replies
SHTOOL-INSTALL.TMP(1)					      GNU Portable Shell Tool					     SHTOOL-INSTALL.TMP(1)

NAME
shtool-install - GNU shtool install(1) command SYNOPSIS
shtool install [-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy] [-C|--compare-copy] [-s|--strip] [-m|--mode mode] [-o|--owner owner] [-g|--group group] [-e|--exec sed-cmd] file [file ...] path DESCRIPTION
This command installs a one or more files to a given target path providing all important options of the BSD install(1) command. The trick is that the functionality is provided in a portable way. OPTIONS
The following command line options are available. -v, --verbose Display some processing information. -t, --trace Enable the output of the essential shell commands which are executed. -d, --mkdir To maximize BSD compatiblity, the BSD "shtool "install -d"" usage is internally mapped to the "shtool "mkdir -f -p -m 755"" command. -c, --copy Copy the file to the target path. Default is to move. -C, --compare-copy Same as -c except if the destination file already exists and is identical to the source file, no installation is done and the target remains untouched. -s, --strip This option strips program executables during the installation, see strip(1). Default is to install verbatim. -m, --mode mode The file mode applied to the target, see chmod(1). Setting mode to ""-"" skips this step and leaves the operating system default which is usually based on umask(1). Some file modes require superuser privileges to be set. Default is 0755. -o, --owner owner The file owner name or id applied to the target, see chown(1). This option requires superuser privileges to execute. Default is to skip this step and leave the operating system default which is usually based on the executing uid or the parent setuid directory. -g, --group group The file group name or id applied to the target, see chgrp(1). This option requires superuser privileges to execute to the fullest extend, otherwise the choice of group is limited on most operating systems. Default is to skip this step and leave the operating system default which is usually based on the executing gid or the parent setgid directory. -e, --exec sed-cmd This option can be used one or multiple times to apply one or more sed(1) commands to the file contents during installation. EXAMPLE
# Makefile install: : shtool install -c -s -m 4755 foo $(bindir)/ shtool install -c -m 644 foo.man $(mandir)/man1/foo.1 shtool install -c -m 644 -e "s/@p@/$prefix/g" foo.conf $(etcdir)/ HISTORY
The GNU shtool install command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1997 for GNU shtool. It was prompted by portability issues in the installation procedures of OSSP libraries. SEE ALSO
shtool(1), umask(1), chmod(1), chown(1), chgrp(1), strip(1), sed(1). 18-Jul-2008 shtool 2.0.8 SHTOOL-INSTALL.TMP(1)
All times are GMT -4. The time now is 06:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy