Assuming that neither the path you want to replace nor the replacement path contain any characters that are special in a regular express AND that the path you want to replace is the some number of initial directories in pathnames to be replaced (not an entire pathname), the following simple sed script should work:
This User Gave Thanks to Don Cragun For This Post:
I need to replace the line containing "STAGE_DB" with the line
"STAGE_DB $DB # database that contains the table being loaded ($workingDB)"
Here $DB is passed during the runtime.
How can I do this?
Thanks,
Kousikan (2 Replies)
Hi,
I am looking for any script which can do the following.
have to read a pattern from fileA and copy it to fileB.
fileA:
...
...
Header
...
...
..p1
...
...
fileB:
....
....
Header (3 Replies)
I have a pattern
username:x:32005:32006::/usr/local/user:/bin/bash
I need to match the line containing username and replace /bin/bash with /usr/local/my/bin/noshell
So it becomes
username:x:32005:32006::/usr/local/user:/usr/local/my/bin/noshell (7 Replies)
Hi How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Hi,
I need to do find and replace, but the pattern is not full known.
for example,
my file has /proj/app-d1/sun or /data/site-d1/conf
here app-d1 and site-d1 is not constant. It may be different in different files. common part is /proj/xx/sun and /data/xxx/conf
i want to find where ever... (6 Replies)
Discussion started by: rbalaj16
6 Replies
LEARN ABOUT DEBIAN
tartrc
tartrc(5) LinuxTaRT configuration file format tartrc(5)NAME
.tartrc - Configuration file for LinuxTaRT
DESCRIPTION
LinuxTaRT uses a configuration file called tartrc. This configuration file is searched for in the following location:
~/.tartrc
PARAMETERS
CustomText1 = string
Signature header or text to replace %c1 in template.
CustomText2 = string
Signature footer or text to replace %c2 in template.
SignatureFile = /path/to/signature_file
Location and name file to write the sigature to.
TagLineDatabase = /path/to/tagline_database
Location and name of tagline database. (defaults to /etc/tart.tags)
SpecialDates = /path/to/special_dates
Location and name of special date file.
CustomFile = /path/to/template
Location and name of layout template.
The following settings may be overridden from the command line.
RunQuiet = 0|1
Display information during executution.
ShowDate = 0|1
Display the date in the default signature.
ShowVersion = 0|1
Display the LinuxTaRT version in the default signature.
CenterText = 0|1
Center the text in the default signature.
UseCustomText = 0|1
Generate signature from template or use default layout.
UseSpecialDates = 0|1
Check special date file for special dates.
RunAsDaemon = seconds
Run as a daemon and wait this many seconds between updates.
FILES
~/.tartrc
SEE ALSO tart(1)tartdates(5)tart-custom(5)Mark Veinot 1.0.0 tartrc(5)