Sponsored Content
Top Forums Shell Programming and Scripting sed returns error "sed: -e expression #1, char 18: unterminated `s' command" Post 302714461 by anand.shah on Friday 12th of October 2012 07:42:59 AM
Old 10-12-2012
sed returns error "sed: -e expression #1, char 18: unterminated `s' command"

Hello All,
I have something like below
Code:
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a

I want to remove till first forward slash that is outputshould be as below
Code:
rel/prod/libinactrl.a
rel/prod/libinactrl.a

How can I do that ???
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

"sed -n expression " fails. Why?

Hi Everyone! I am trying to extract records between date makers in a log file. My selection string doesn't work, though. Please help. This test works, if I manually enter the two date-strings (output=28 lines): # sed -n '/\/,/\/p' ./access_log But if the date string is a variable, it will... (2 Replies)
Discussion started by: grahamb
2 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. Shell Programming and Scripting

sed: -e expression #1, char 21: unterminated `s' command

I have read many threads, but I still didn't find the right answer. May be i didn't find the right thread, though are so many threads for the same question. Basically the situation is - find date in a file and replace it with another date. (its not homework, its part of lot of a big processing,... (10 Replies)
Discussion started by: avinthm
10 Replies

4. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

5. UNIX for Dummies Questions & Answers

sed error unterminated `s' command

I have list of data I have cut down to format: I am using sed command to remove the sed 's/ Returns error: sed: -e expression #1, char 5: unterminated `s' command Full code line is: cat textFile | cut -d ' ' -f 4 | cut ':' -f 1 | sed 's/ Thanks, Please use next time code tags... (2 Replies)
Discussion started by: maximus73
2 Replies

6. Shell Programming and Scripting

Sed: -e expression #1, char 2: extra characters after command

Greetings.. getting the error while execution of the script, correct where i am missing #!/bin/bash DATE=`date +%Y-%m-%d:::%H:%M` HOSTNAME=`hostname` TXT="/log/temp.txt" LOGPATH="/log1/commanlogs/" IP=`/sbin/ifconfig | grep -i inet| head -n1| awk '{print $2}'| awk -F : '{print $2}'`... (7 Replies)
Discussion started by: manju98458
7 Replies

7. Shell Programming and Scripting

Source command returns error when it strikes conditional statement "ifeq"

Hello All, I am running source command on my project configuration file app.cfg which has conditional statements with make file systax E.g ifeq ($(APP_CMP_DIR),trunk). When I source this file it throws error: syntax error near unexpected token... (1 Reply)
Discussion started by: anand.shah
1 Replies

8. Shell Programming and Scripting

Sed: -e expression #1, char 16: unterminated address regex

I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine. ... (23 Replies)
Discussion started by: rbadveti
23 Replies

9. Shell Programming and Scripting

Using sed command to replace "|" with ^ for all *.dat files in a folder not working

I am trying to use the below sed command to replace all "|" to ^, in a folder had 50 dat files. when i tried with 1 file it worked but when i tried with wild card, is not working. sed -i 's/"|"/\^/g' *.dat Is this the proper way to use sed command thank you very much for help. (3 Replies)
Discussion started by: cplusplus1
3 Replies

10. UNIX for Beginners Questions & Answers

Sed: -e expression #1, char 20: unterminated address regex

I am trying to add word in last of particular line. the same command syntex is running on prompt. but in bash script give error."sed: -e expression #1, char 20: unterminated address regex" Please help. for i in `cat servername`; do ssh -q -t root@$i sed -i '/simple_allow_groups =/s/$/,... (4 Replies)
Discussion started by: yash_message
4 Replies
Gedcom::Individual(3pm) 				User Contributed Perl Documentation				   Gedcom::Individual(3pm)

NAME
Gedcom::Individual - a module to manipulate Gedcom individuals Version 1.16 - 24th April 2009 SYNOPSIS
use Gedcom::Individual; my $name = $i->name; my @rel = $i->father; my @rel = $i->mother; my @rel = $i->parents; my @rel = $i->husband; my @rel = $i->wife; my @rel = $i->spouse; my @rel = $i->siblings; my @rel = $i->brothers; my @rel = $i->sisters; my @rel = $i->children; my @rel = $i->sons; my @rel = $i->daughters; my @rel = $i->descendents; my @rel = $i->ancestors; my $ok = $i->delete; my @fam = $i->famc; my @fam = $i->fams; DESCRIPTION
A selection of subroutines to handle individuals in a gedcom file. Derived from Gedcom::Record. HASH MEMBERS
None. METHODS
name my $name = $i->name; Return the name of the individual, with spaces normalised. cased_name my $cased_name = $i->cased_name; Return the name of the individual, with spaces normalised, and surname in upper case. surname my $surname = $i->surname; Return the surname of the individual. given_names my $given_names = $i->given_names; Return the given names of the individual, with spaces normalised. soundex my $soundex = $i->soundex; Return the soundex code of the individual. This function is only available if Text::Soundex.pm is available. sex my $sex = $i->sex; Return the sex of the individual, "M", "F" or "U". Individual functions my @rel = $i->father; my @rel = $i->mother; my @rel = $i->parents; my @rel = $i->husband; my @rel = $i->wife; my @rel = $i->spouse; my @rel = $i->siblings; my @rel = $i->older_siblings; my @rel = $i->younger_siblings; my @rel = $i->brothers; my @rel = $i->sisters; my @rel = $i->children; my @rel = $i->sons; my @rel = $i->daughters; my @rel = $i->descendents; my @rel = $i->ancestors; Return a list of individuals related to $i. Each function, even those with a singular name such as father(), returns a list of individuals holding that relation to $i. More complex relationships can easily be found using the map function. eg: my @grandparents = map { $_->parents } $i->parents; delete my $ok = $i->delete; Delete $i from the data structure. This function will also set $i to undef. This is to remind you that the individual cannot be used again. Returns true iff $i was successfully deleted. Family functions my @fam = $i->famc; my @fam = $i->fams; Return a list of families to which $i belongs. famc() returns those families in which $i is a child. fams() returns those families in which $i is a spouse. perl v5.14.2 2012-04-12 Gedcom::Individual(3pm)
All times are GMT -4. The time now is 06:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy