Hi,
I am new to this forum and my script skills are very weak.
I have this file (file 1) that contains 3 columns (tab delimited):
kyle start stop
john start stop
joe start stop
And I want to replace name (column 1) from another file. This other file has two columns, one is the... (4 Replies)
I am having the following problem. I am having a lot of files (test_1_01.hea, test_1_02.hea, etc) with the content:
project_directory /net/1/d_1/5/
tmp_directory /net/1/d_1/5/
material_directory /net/1/d_1/5/
And I have to substitute the filepaths with new counted ones where the... (3 Replies)
I'd like to do this using Perl command line (sorry no awk, sed, etc.)
replace the 3 middle lines in a file by one line:
aaa 123
bbb 234
ccc 34567
dd 4567
ee 567
to:
aaa 123
AAA
ee 567
I tried this but not working:
perl -pi -e "s/aaa\ 123\nbbb\ 234\nccc\ 34567/AAA/" file (2 Replies)
dear,
I have below file called folderlist.txt
# ParentFolder environment_flag SubFolders
triss 1 checksum
bookstructure 1
fx 1 checksum_GMDB
I have a script which which will create the folders under... (3 Replies)
When the line contains abc, it will goes to the next line and substitue the MM to NN
bc 23 33
abc 23 33
ddd MM xx
dff MM 33
cat xxx |awk '{if ($0~/abc/){getline;sub(/MM/,"NN")}{print}}', It doesn't show "abc 23 33
bc 23 33
ddd NN xx
dff MM 33
bc 23 33
abc 23 33
ddd NN xx... (1 Reply)
Hello All,
I have this script to awk IP to new file.
#awk '/myip|yourip/ {sub(/...\....\....\..../, newip)}1' newip=$IP existing.txt > new.txt
When existing.txt has myip=192.168.123.123 and $IP has 192.168.12.12, the awk script is not working. But while I add zero left padding to $IP i.e,... (3 Replies)
Hi,
The following awk command :
asmcmd lsdg | awk '{print $13;}' | grep -i ${SID}
return the following output . An Empty line + two lines contain "/" at the end of the line
INDEVDATA/
INDEVFRA/
I need to remove the "/" as well as the empty line.
Please advise
Thanks (3 Replies)
I need to make ~96 configure files from a template config file which has hundreds of rows that looks like:
template.config:
#average insert size
avg_ins=1000
......
other information omitted
Those config files are named in sequence from S01.config, S02.config, ... etc
with different... (11 Replies)
Dear All,
I would like to instantiate a "pattern file" substituting "variable name" by their content.
Saying, we have:
1/ a "pattern file" containing different "variable name", the first character of the "variable name" is "@":
$ cat TPTModl.txt
DEFINE... (12 Replies)
Team,
I want to change below parameter in all the files in a directory,
Check for HOSTNAME=`hostname`
Change to HOSTNAME=localhost
And I tried below but, its not working ☹
find /tmp -type f -exec sed 's/"HOSTNAME\=\`hostname\`"/"HOSTNAME\=localhost/g'"
Help me if I am missing... (6 Replies)