Sponsored Content
Full Discussion: condense multiple steps
Top Forums Shell Programming and Scripting condense multiple steps Post 302491371 by dba_frog on Thursday 27th of January 2011 08:56:12 AM
Old 01-27-2011
condense multiple steps

Can I do multiple passes in one step?
Code:
sed    's/<FONT face='\''Arial'\'' size='\''3'\''>//'  $file > tmpfile.html ; mv tmpfile.html $file
sed    's/<FONT face='\''Courier'\'' size='\''3'\''>//'  $file > tmpfile.html ; mv tmpfile.html $file
sed    's/<\/FONT>//'    $file > tmpfile.html ; mv tmpfile.html $file
sed    's/<table border=0>/<table border=1 width=95%>/'              $file > tmpfile.html ; mv tmpfile.html $file

I tried:
Code:
sed    's/<FONT face='\''Arial'\'' size='\''3'\''>//'        \
sed    's/<FONT face='\''Courier'\'' size='\''3'\''>//'     \
sed    's/<\/FONT>//'                                                \
sed    's/<table border=0>/<table border=1 width=95%>/'              $file > tmpfile.html ; mv tmpfile.html $file

but that wasn't correct. Should I pipe them ?
 

10 More Discussions You Might Find Interesting

1. Solaris

steps to ufsrestore

Hello Folks, I have to restore from remote tape sun solaris 10. It has to have mirror raid. I have to restore /,/usr, /var,/opt, /etc,/u01. Could you please give me detailed steps to do the above? I am new to solaris Thanks Ram (1 Reply)
Discussion started by: vr76413
1 Replies

2. IP Networking

Subnetting in 11 steps

As seen on Digg.com, here is my ip addressing article in full... Original Subnetting in 11 Steps article Subnetting in 11 Steps There are a few things that you will need to know first. I personally use 11 rules that I learned from Mike Vana. Below you will find the 11 rules as well as... (1 Reply)
Discussion started by: jking2100
1 Replies

3. HP-UX

modifying start up steps

I tried search and didn't see anything - if there is a thread please point me to it - I want to add a couple of statements to the start up steps basically to touch a file and set the owner & group on it. I want this to happen every start-up. I haven't had sysadm class since HP-UX 9.x and I... (1 Reply)
Discussion started by: LisaS
1 Replies

4. Solaris

Steps toward Solaris Administration

Dear All, I am currently working as Unix Operator. I am looking forward for Unix Solaris Administration. I need everyone's guidance on this forum, please advice me from where should i start. well i have already installed Solaris version on X86. So please let me know what should i do to become... (9 Replies)
Discussion started by: imrankhan.in
9 Replies

5. Shell Programming and Scripting

First steps in Perl

Hello, I want to start learning Perl, but I need some expert's advice:) Could you recommend me any online manual or book to start with? I have some experience with bash and C, so I am not a complete newbie in programming. What's your advise to start with? Thank you very much for your answers! ... (5 Replies)
Discussion started by: tsurko
5 Replies

6. Shell Programming and Scripting

Need to condense numerous IF/ELSE/FI statements into one if possible.

Hi there! Have literally just started using UNIX bash shell again and am writing simple scripts in VI. I basically have a working script but I know without a doubt it could be condensed down to much less code by integrating the individual IF statements. Here is my shoddy code :) ... (5 Replies)
Discussion started by: U_C_Dispatj
5 Replies

7. AIX

Steps to remove the hacmp

Hi We got a two node active passive hacmp cluster. All of a sudden we got a requirement to remove the hacmp and use the passive node for another application. Hence we need to remove the hacmp and use the nodes as stand alone nodes henceforth? What are the steps to be followed for destroying the... (2 Replies)
Discussion started by: samsungsamsung
2 Replies

8. UNIX for Dummies Questions & Answers

New install, how to capture the steps?

Hi All, I am working on a new server Dell which I need to install RH version 6.1. I need to document every thing I do on this server, how do I capture screen shot as I do the install? I used to work on Sun Solaris, I can do this by connecting on COM port after that I had the console access... (2 Replies)
Discussion started by: samnyc
2 Replies

9. Shell Programming and Scripting

sed command to condense two lines into one

My eyes glaze over trying to understand multiline sed commands, so please forgive me if this has been asked before. I'd like to condense the following two lines: fooPATTERN1 PATTERN2bar into the following one line: foobar How is that done in sed? (7 Replies)
Discussion started by: scolfax
7 Replies

10. Solaris

Live upgrade first steps

Hello Guys, I am a little confused about the first step in the live upgrade process. I will be glad if someone can clarify this for me. The pre-live upgrade patch, when do you add this patch to the OS you want to upgrade? 1. before creating the new boot environment? or 2. after creating... (1 Reply)
Discussion started by: cjashu
1 Replies
TMPFILE(3)						     Linux Programmer's Manual							TMPFILE(3)

NAME
tmpfile - create a temporary file SYNOPSIS
#include <stdio.h> FILE *tmpfile(void); DESCRIPTION
The tmpfile() function opens a unique temporary file in binary read/write (w+b) mode. The file will be automatically deleted when it is closed or the program terminates. RETURN VALUE
The tmpfile() function returns a stream descriptor, or NULL if a unique filename cannot be generated or the unique file cannot be opened. In the latter case, errno is set to indicate the error. ERRORS
EACCES Search permission denied for directory in file's path prefix. EEXIST Unable to generate a unique filename. EINTR The call was interrupted by a signal. EMFILE Too many file descriptors in use by the process. ENFILE Too many files open in the system. ENOSPC There was no room in the directory to add the new filename. EROFS Read-only file system. CONFORMING TO
SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001. NOTES
POSIX.1-2001 specifies: an error message may be written to stdout if the stream cannot be opened. The standard does not specify the directory that tmpfile() will use. Glibc will try the path prefix P_tmpdir defined in <stdio.h>, and if that fails the directory /tmp. SEE ALSO
exit(3), mkstemp(3), mktemp(3), tempnam(3), tmpnam(3) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2008-07-14 TMPFILE(3)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy