Sponsored Content
Full Discussion: solaris sed equivalent
Top Forums Shell Programming and Scripting solaris sed equivalent Post 302675671 by yazu on Monday 23rd of July 2012 11:47:45 AM
Old 07-23-2012
Try:
1. Use ordinary quotes instead of double ones.
2. Insert a literal newline after "i" command.

Code:
sed -e 'i\
H,0001' -e 's/$/,1,2/' abc > abc.tmp

This User Gave Thanks to yazu For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Solaris equivalent of the ioscan command

What is the Solaris equivalent of the HP-UX "ioscan -funC" command which lists all hardware on the system? (5 Replies)
Discussion started by: etc
5 Replies

2. Solaris

I want a command in solaris equivalent to glance in HP-UX

Hi, C an someone help me out in getting the command to get system statistics like CPU, DISK and I/O utilization in a single command instead of mpstat,vmstat and iostat. When i give sar, getting the following error, bash-3.00# sar sar: can't open /var/adm/sa/sa15 No such... (6 Replies)
Discussion started by: grrajeish
6 Replies

3. Shell Programming and Scripting

ps ax equivalent in solaris

I am using "ps ax" command in one of my scripts . AIX has x flag for ps . is there any equilent command for ps ax in solaris ? Thanks (1 Reply)
Discussion started by: talashil
1 Replies

4. UNIX for Dummies Questions & Answers

What is the equivalent of Solaris snoop in Linux

What is the equivalent of Solaris snoop in Linux I could not find snoop in RHEL (2 Replies)
Discussion started by: santosh149
2 Replies

5. Shell Programming and Scripting

ttytype equivalent command in Solaris.

Hi All, We are trying to migrate scripts from HP Unix to Solaris server, in one of the profile file following command is used to set terminal settings and export its value, "ttytype -a -s " Now the same command is not present in Solaris, could someone let me know which command should i... (0 Replies)
Discussion started by: arvindcgi
0 Replies

6. UNIX for Dummies Questions & Answers

Equivalent of /etc/rc.local in Solaris 10

What is the equivalent of /etc/rc.local in Solaris 10? (4 Replies)
Discussion started by: proactiveaditya
4 Replies

7. Shell Programming and Scripting

SED equivalent for grep -w -f with pattern having special characters

I'm looking for SED equivalent for grep -w -f. All I want is to search a list of patterns from a file. Also If the pattern doesn't match I do not want "null returned", rather I would prefer some text as place holder say "BLANK LINE" as I intend to process the output file based on line number. ... (1 Reply)
Discussion started by: novice_man
1 Replies

8. Solaris

ignite hp-ux, which is the equivalent in solaris?

functions... ---------- Post updated at 02:51 PM ---------- Previous update was at 02:22 PM ---------- sorry i didnīt put the header in the message. i use to add this to cron in hp-ux for do the ignite 00 00 1,15 * * /opt/ignite/bin/make_net_recovery -s <IGNITE SERVER> -n 1 -P s -u -x... (5 Replies)
Discussion started by: pabloli150
5 Replies

9. UNIX for Dummies Questions & Answers

A faster equivalent for this sed command

Hello guys, I'm cleaning out big XML files (we're talking about 1GB at least), most of them contain words written in a non-latin alphabet. The command I'm using is so slow it's not even funny: cat $1 | sed -e :a -e 's/&lt;*&gt;//g;/&lt;/N;//ba;s/</ /g;s/>/... (4 Replies)
Discussion started by: bobylapointe
4 Replies

10. Shell Programming and Scripting

sed Equivalent for awk/grep

Any equivalent command using awk or grep? sed -n "/^$(date --date='10 minutes ago' '+%b %_d %H:%M')/,\$p" /abc.log (7 Replies)
Discussion started by: timmywong
7 Replies
XMLSTARLET(1)							 xmlstarlet Manual						     XMLSTARLET(1)

NAME
xmlstarlet - command line XML/XSLT toolkit SYNOPSIS
xmlstarlet [<options>] [<command>] [<cmd-options>] INTRODUCTION
XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files us- ing simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands. This set of command line utilities can be used by those who deal with many XML documents on UNIX shell command prompt as well as for auto- mated XML processing with shell scripts. OPTIONS
--version Display the version of xmlstarlet. --help Display help. COMMANDS
Type: xml <command> --help <ENTER> for command help Available commands include: ed (or edit) Edit/update XML document(s). sel (or select) Select data or query XML document(s) (XPATH, etc). tr (or transform) Transform XML documents(s) using XSLT. val (or validate) Validate XML document(s) (well-formed/DTD/XSD/RelaxNG). fo (or format) Format XML document(s). el (or elements) Display element structure of XML document. c14n (or canonic) XML canonicalization. ls (or list) List directory as XML. esc (or escape) Escape special XML characters. unesc (or unescape) Unescape special XML characters. pyx (or xmln) Convert XML into PYX format (based on ESIS - ISO 8879). p2x (or depyx) Convert PYX into XML. REFERENCES
XMLStarlet is a command line toolkit to query/edit/check/transform XML documents (for more information see http://xmlstar.source- forge.net/). AUTHOR
Mikhail Grushinskiy. XMLSTARLET(1)
All times are GMT -4. The time now is 12:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy