I'm trying to use 'sed' to substitute some a string, but I can't get it to work.
Can anyone help me, please?
sed 's/d \qmaster\spool1\qmuser/temp_/' account1 > account
There is a space between d and \qmaster (2 Replies)
all,
I am trying to write a script that will dynamically change passwords within a group of files. Each file will have a record such as PASSWORD="xxxxxxxxx". I plan on creating a file with a list of passwords, (say 500,000) and then writing a 'for' loop that will cycle thru each, and replace... (5 Replies)
Hi
I am trying to replace an extension in a file name using sed as follows:
echo $filename | sed 's/.txt/.doc/'
My objective is to replace any extension with let's say a .doc extension. Right now, my input may have two extensions; .txt and .csv. I have to replace both with a .doc... (17 Replies)
It seems that I really need some serious regexp study, in the following example,
>cat /tmp/test
abc 7878 7878 7878 7878 123 123 123 345 234 345 345 345 345
>sed 's/\(* \)*/\1/g' /tmp/test
345 345
Why sed deletes all the columns except the last two ones? From what I understood, sed... (1 Reply)
Hello, I am very new to shell scripting and have a directory path such as:
/usr/dev/blah/Arch/release/812-1235-P05/files/list and I want to output:
812-1235-P05
I think using sed with a regex like --? would be the way to go, but I am having much trouble getting it to work. Any suggestions?... (4 Replies)
Write a sed script to extract the year, rank, and stock for the most recent 10 years available in the file top10_mktval.csv, and output in the following format:
------------------------------
YEAR |RANK| STOCK
------------------------------
2007 | 1 | Exxon... (1 Reply)
How does sed substitutes a string of characters in a file and replace it with a string passed as an argument to a variable in a script and saves the file with the changes.
Say for example
read name
sed 's/string1/$name/g filename
BTW I am using /bin/sh (4 Replies)
Discussion started by: Tirmazi
4 Replies
LEARN ABOUT SUSE
pfunc
PFUNC(1) User Contributed Perl Documentation PFUNC(1)NAME
pfunc - grep for perl functions
SYNOPSIS
pfunc subroutine FILES...
DESCRIPTION
pfunc searches the named FILES for all calls to the given subroutine. It will report back the file and line number each call is found on
along with what sort of call it is
function foo()
class method Class->foo()
object method $obj->foo()
EXAMPLE
$ pfunc isa /usr/share/perl/5.6.1/*.pm
Called as function in /usr/share/perl/5.6.1/CGI.pm at line 316
Called as function in /usr/share/perl/5.6.1/CGI.pm at line 327
Called as function in /usr/share/perl/5.6.1/CGI.pm at line 397
Called as function in /usr/share/perl/5.6.1/CGI.pm at line 494
Called as function in /usr/share/perl/5.6.1/CGI.pm at line 495
Called as object method in /usr/share/perl/5.6.1/CPAN.pm at line 4957
Called as function in /usr/share/perl/5.6.1/Dumpvalue.pm at line 191
Called as function in /usr/share/perl/5.6.1/Dumpvalue.pm at line 218
Called as function in /usr/share/perl/5.6.1/Dumpvalue.pm at line 248
Called as function in /usr/share/perl/5.6.1/Dumpvalue.pm at line 251
Called as function in /usr/share/perl/5.6.1/Dumpvalue.pm at line 254
Called as object method in /usr/share/perl/5.6.1/Shell.pm at line 28
Called as object method in /usr/share/perl/5.6.1/base.pm at line 12
NOTES
Its not fast, but its accurate.
AUTHOR
Michael G Schwern <schwern@pobox.com>
SEE ALSO
Module::Info
perl v5.12.1 2002-12-05 PFUNC(1)