Sponsored Content
Full Discussion: Need urgent sed help
Top Forums Shell Programming and Scripting Need urgent sed help Post 302120698 by Perderabo on Thursday 7th of June 2007 04:00:00 PM
Old 06-07-2007
I got this syntax to work:
Code:
#! /usr/local/bin/bash
install_top=/test1/test2/test3
fl2=./display_report.pl
echo $fl2
sed "5c\\
\$install_top = $install_top
"  < $fl2

\ is special to the shell, so you need \\ so sed will see \
replacement text must be on next line and sed needs to see the newline chars too, at least my sed needs this...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

urgent sed help

Hi folks. I've tried to research this, but haven't found a good answer (could be my harried state). At any rate, I have records that end with two commas, a number, two commas this could be anywhere from ,,01,, to ,,09875953,, I need to remove the last two fields (the number... (3 Replies)
Discussion started by: kristy
3 Replies

2. Shell Programming and Scripting

sed script help urgent

Collegues I am dealing with raw text files which is extracted from web pages. I have to find sentances which contains more than 99 words and have to put a "." after the 99th or 98 th word . Is there any possiblity to it in sed or awk With regards Jaganadh.H (5 Replies)
Discussion started by: jaganadh
5 Replies

3. Shell Programming and Scripting

Urgent Help With Sed

Hello, I need to use sed to replace a word in file. My command is this: sed "s/word_to_replace/'"${INPUT}"'/1 filename and because INPUT="~@#$%^&*()-_=+{}\|;:<>,./?" and / is also the delimiter so I'm keep on getting error message sed: command garbled: ... any suggestions about how I... (10 Replies)
Discussion started by: katrvu
10 Replies

4. Shell Programming and Scripting

Need Help using sed command(very urgent)

Hi all, Actually i want to delete the .ps extension from package1.ps string by using sed. Can any body tell me that how shell i do it????????? It is very urgent. Can anybody help me. I am trying to do this in the following way. ps_file="package1.ps" echo $ps_file sed s/.ps//g $ps_file... (9 Replies)
Discussion started by: sunitachoudhury
9 Replies

5. Infrastructure Monitoring

sed help,,kind of urgent!!

Hello All, My problem is: I want to replace a line from a file with sed. The first word in that line is always the same in every server. The second line is server model, which of course will vary from platform to platform and I need to leave that word as it is. After the second word, I need to... (3 Replies)
Discussion started by: solaix14
3 Replies

6. Shell Programming and Scripting

Urgent solution for simple sed

Hi Im running this command on AIX in ksh. My input file samp1 contains 1 2 123 12345 When I execute the following sed i dont get a matching pattern sed -n '/{1}/p' samp1 Can anyone help me with this simple thing (3 Replies)
Discussion started by: raghav288
3 Replies

7. Shell Programming and Scripting

awk or sed help urgent

Hello, I have a file with the follwoing pattern: Input file: =========== tcp://xxx:123 8179 YY 1798 YY tcp://abc:2345 not found tcp://swt:4945 7356 QQ tcp://pqr:456 8178 PP 9485 PP 4485 PP (8 Replies)
Discussion started by: uandme2k2
8 Replies

8. Shell Programming and Scripting

Urgent help req with grep + sed

HI all, i have a line in a file it cantains one;two_1_10;two_2_10;two_3_10;three~ now i need to get the output as one;two_1_abc_10;two_2_abc_10;two_3_abc_10;three~ ( 1 should be replaced with 1_abc for two__10 , and one more thing the number of occurances of two_value_10 will be... (1 Reply)
Discussion started by: 2001.arun
1 Replies

9. Shell Programming and Scripting

Need Urgent help on awk/sed

Hi, Sample Input Table 1 XXXXX YYYYY A 1 2 3 4 5 B 1 2 3 4 5 C 1 2 3 4 5 D 1 2 3 4 5 A 6 7 B 6 7 C 6 7 D 6 7 Table 2 XXXXX YYYYY E 1 2 3 4 5 F 1 2 3 4 5 E 6 7 F 6 7 Table 3 XXXXX YYYYY G 1 2 3 4 5 (4 Replies)
Discussion started by: ravin
4 Replies

10. Shell Programming and Scripting

sed command error-URGENT

sort.sh ------ ls -lSr|cat -n/*gives the detailed description o files with a serial number concatenated*/ i=0 n=10 j=$n if then while do (sh -C sub.sh $i $j)& ((i++)) ((j--)) done fi if then while do (sh -C sub.sh $i $j)& (1 Reply)
Discussion started by: dishak
1 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 12:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy