02-26-2009
So you want to check what the first line is, without actually altering any of the data?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that is reading an existing report, pulling out the customer code, then tacking on the customer name from another file and replacing the existing customer code with the new field. This was written for me by someone else. I'm not real familiar with sed.
The data is getting into... (3 Replies)
Discussion started by: MizzGail
3 Replies
2. Shell Programming and Scripting
Hi
I want to replace ./testsed.ksh
with
testsed.ksh
./ is to be removed
scriptnm=`sed -e 's/\.///' $0
does not work
Please help (3 Replies)
Discussion started by: usshell
3 Replies
3. Shell Programming and Scripting
Greetings,
I am doing something that I don't know if it is possible...
I have a file with a line looks like this:
<%s \n%s / %s \n%s \n>
and I am trying to replace this line with
<%s \n%s \n%s / %s \n%s \n>
in Shell script with sed command...
StringToReplace='%s \n%s / %s \n%s \n'... (2 Replies)
Discussion started by: wasabihowdi
2 Replies
4. Shell Programming and Scripting
I have the replace the pattern in the file , ); to );
Could someone please help me to get this command. (2 Replies)
Discussion started by: mohan.bit
2 Replies
5. Shell Programming and Scripting
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies
6. OS X (Apple)
To the group, when I copy text from a web page that has the below java code , and then do the set list command in the vi editor, I see the $ symbol at the end of each line. I have searched the internet looking for a way to remove this from the file since it will not compile without errors..Please... (6 Replies)
Discussion started by: smartino
6 Replies
7. Shell Programming and Scripting
Hello
I've got a string of text with a number in pence, e.g. 0.52p, I need to remove the 'p' so that it just reads 0.52 without of course removing all the other 'p' characters.
Many thanks (1 Reply)
Discussion started by: mrpugster
1 Replies
8. Shell Programming and Scripting
Hi,
The command - id | awk '{print $1}' - returns the following:
uid=9028(luke)
What do I need to further that awk so that I only have "luke", I want to set this as a variable.
Thanks in advance,
Lukas.
P.S: I've come up with:
USER1=`id | awk F'(' '{print $2}' | awk -F')' '{print... (4 Replies)
Discussion started by: luke222010
4 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have a text file that contains
I1SP2 *=*=Y=M=D001D
My requirement is to replace all occurrence of =* to =Z
expected o/p is I1SP2 *=Z=Y=M=D001D
I have tried with
sed 's/=*/=Z/g' file
sed 's!\=*!\=Z/g' file
sed 's!\=*!\=Z!g' file
sed 's!\=\*!\=Z!g' file
but its not... (3 Replies)
Discussion started by: gotamp
3 Replies
10. Shell Programming and Scripting
Hi all
I got test.test.test and need
test.test\.test *
I need the backslash before the last dot in the line
I tried
echo test.test.test | sed 's/\./\\./g'
but it gives me
test\.test\.test
Thanks (7 Replies)
Discussion started by: stinkefisch
7 Replies
LEARN ABOUT SUSE
shape_stdrul
SHAPE_STDRUL(7) Miscellaneous Information Manual SHAPE_STDRUL(7)
NAME
shape stdrul - shapeTools RMS general version selection rules
DESCRIPTION
The shape release management system requires a set of standard version selection rules to be accessible project wide. These are defined in
the stdrules file, which is to be included into the Shapefiles of any part of the system controlled by the shapeTools release management
system. Version selection rules drive the binding of component names in the Shapefile to specific versions during a build or release
process (or better: any process performed by invocation of shape(1) ). Some functions of shape_RMS allow definition of the version binding
rule being active by defining the VERSIONS macro on the command line. This may be set to any of the rule names listed below.
If you want to introduce new version selection rules for project wide use, you may add them to the stdrules file. You should be very care-
ful, when altering this file. Do not remove any of the rules defined in the original version of stdrules (as it comes from the shapeTools
distribution tape) because these are essential for the release management system. When altering one of the original selection rules, you
should be very concious of what you are doing, as you may affect the operationality of shape RMS. For a description of the syntax of rule
definitions, see the shape(1) manual.
The standard version selection rules are:
most_recent
For each component select a busy version if available, the most recent saved version otherwise.
last_proposed
Use the last proposed version of each component. This rule fails, if no proposed version is available
last_released
Select versions from the last generated release.
last_prereleased
Select versions from the last generated prerelease.
recent_release
Select versions included in the last release or prerelease, whichever is newer.
from_release
Select versions from a specific release or prerelease. When using this rule the value of the macro RELEASENAME has to be set to
the name of the desired (pre)release.
extern Always select a busy version (a regular UNIX file). This rule should be applied to all extern components that are not under con-
trol of the shapeTools version control system.
FILES
$(SHAPELIBPATH)/stdrules
SEE ALSO
shape_RMS(1), shape(1)
29.9.119 SHAPE_STDRUL(7)