how to use sed command to find and replace a directory
i have a file.. which contains lot of paths ...
for eg.. file contains..
/usr/kk/rr/12345/1
/usr/kk/rr/12345/2
/usr/kk/rr/12345/3
/usr/kk/rr/12345/4
/usr/kk/rr/12345/5
/usr/kk/rr/12345/6
/usr/kk/rr/12345/7... (1 Reply)
Hi,
I have a entry in the file as
::BSNL GUJARAT::India::OUT::NAT::REWEL::POSTPAID::919426199995
if u see this, i have the delimiter as :: ,
all i want is to replace "::" as ":"
so how to do that..
pls help
thanks (10 Replies)
Hi, Im very new to the world of sed so I'm really not even sure if this is possible. What i need to do is read from a flat file and every time i see this line:
VAL=123,456
I need to change 456 to 457 for every occurence of this line in the file. The numbers 123 and 456 are different for... (6 Replies)
hello forum memvers,
1:I have to write a script for find a string and replace with another string.
2:In shell script how to replace one string with another string.:b: (4 Replies)
Hi all !
I have a fasta file that looks like that:
>Sequence1
RTYIPLCASQHKLCPITFLAVK
(it's just an example, obviously in reality I have several pairs of lines like that)
Using UNIX command(s), would it be possible to replace all the characters except the "C" of the second line only by... (7 Replies)
Hello All,
I need a sed command to find and replace below text in multiple files in a directory.
Original Text :- "$SCRIPT_PATH/files"
Replace with :- "$RESOURCE_FILE"
Thank you in advance !!!
Regards,
Anand Shah (1 Reply)
Hi,
Am trying to replace a character '-' with 'O' in position 289 in my file but am not success with below command.
sed 's/^\(.\{289\}\)-/\1O/' filename
sed: 0602-404 Function s/^\(.\{289\}\)-/\1O/ cannot be parsed.
Thanks in Advance
Sara
Video tutorial on how to use code tags in The... (9 Replies)
Hi Gurus,
I did an exhaustive search for finding the script using "sed" to exclude the first line of file during find and replace.
The first line in my file is the header names.
Thanks for your help.. (4 Replies)
The content of the file filea.txt is as follows.
---------
case $HOSTNAME in
aaa)
DS_PARM_VALUE_SET=vsDev
APT_Configuration_File=/appl/infoserver/Server/Configurations/2node.apt
;;
bbb)
DS_PARM_VALUE_SET=vsQA... (3 Replies)
Hello,
I'm on HP Unix and in a Job, I tried to extract all files from a folder, and replace the extension (.xxxx) by '*' , remove duplicates and move the result in a file..
Example :
Folder has : ABC, CCC.txt, CCC.sf, CCC.sfd, DDD
I need to generate and output file with :
... (6 Replies)
Discussion started by: royinfo.alain
6 Replies
LEARN ABOUT BSD
lprm
LPRM(1) General Commands Manual LPRM(1)NAME
lprm - remove jobs from the line printer spooling queue
SYNOPSIS
lprm [ -Pprinter ] [ - ] [ job # ... ] [ user ... ]
DESCRIPTION
Lprm will remove a job, or jobs, from a printer's spool queue. Since the spooling directory is protected from users, using lprm is nor-
mally the only method by which a user may remove a job.
Lprm without any arguments will delete the currently active job if it is owned by the user who invoked lprm.
If the - flag is specified, lprm will remove all jobs which a user owns. If the super-user employs this flag, the spool queue will be emp-
tied entirely. The owner is determined by the user's login name and host name on the machine where the lpr command was invoked.
Specifying a user's name, or list of user names, will cause lprm to attempt to remove any jobs queued belonging to that user (or users).
This form of invoking lprm is useful only to the super-user.
A user may dequeue an individual job by specifying its job number. This number may be obtained from the lpq(1) program, e.g.
% lpq -l
1st: ken [job #013ucbarpa]
(standard input) 100 bytes
% lprm 13
Lprm will announce the names of any files it removes and is silent if there are no jobs in the queue which match the request list.
Lprm will kill off an active daemon, if necessary, before removing any spooling files. If a daemon is killed, a new one is automatically
restarted upon completion of file removals.
The -P option may be usd to specify the queue associated with a specific printer (otherwise the default printer, or the value of the
PRINTER variable in the environment is used).
FILES
/etc/printcap printer characteristics file
/usr/spool/* spooling directories
/usr/spool/*/lock lock file used to obtain the pid of the current
daemon and the job number of the currently active job
SEE ALSO lpr(1), lpq(1), lpd(8)DIAGNOSTICS
``Permission denied" if the user tries to remove files other than his own.
BUGS
Since there are race conditions possible in the update of the lock file, the currently active job may be incorrectly identified.
4.2 Berkeley Distribution October 22, 1996 LPRM(1)