10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Input:
|Running the Rsync|Sun Oct 16 22:48:01 BST 2016
|End of the Rsync|Sun Oct 16 22:49:54 BST 2016
|Running the Rsync|Sun Oct 16 22:54:01 BST 2016
|End of the Rsync|Sun Oct 16 22:55:45 BST 2016
|Running the Rsync|Sun Oct 16 23:00:02 BST 2016
|End of the Rsync|Sun Oct 16 23:01:44 BST 2016... (4 Replies)
Discussion started by: busyboy
4 Replies
2. Shell Programming and Scripting
I am passing a variable and replace nth value with the variable.
I tried using many options in awk command but unable to ignore the special characters in the output and also unable to pass the actual value.
Input : "1","2","3"
Output : "1","1000","3"
TempVal=`echo 1000`
Cat... (2 Replies)
Discussion started by: onesuri
2 Replies
3. UNIX for Dummies Questions & Answers
Hello all,
I stumbled upon a command line for multiple search and replace within given destination
perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.html
I want to replace the following line where the date is the variable, from
<div class="meta">
<ul>
<li>05.05.2015
with date tags, like... (5 Replies)
Discussion started by: uninuub
5 Replies
4. Shell Programming and Scripting
I have a file that reports the size of disks GB's or TB's - I need the file to report everything in MB's. Here is an extract of the file - the last column is the disk size.
19BC 2363 20G
1AA3 2363 2.93T
1A94 2363 750G
Whenever I come across a G I want to delete the G and multiply by... (2 Replies)
Discussion started by: kieranfoley
2 Replies
5. Shell Programming and Scripting
Hello,
I am using sed in a for loop to replace text in a 100MB file. I have about 55,000 entries to convert in a csv file with two entries per line. The following script works to search file.txt for the first field from conversion.csv and then replace it with the second field. While it works fine,... (15 Replies)
Discussion started by: pbluescript
15 Replies
6. Shell Programming and Scripting
Hi guys,
Hi have this input (Menu.xml)<?xml version="1.0" encoding="ISO-8859-1"?>
<breakfast_menu>
<food>
<name>Berry-Berry Belgian Waffles</name>
<price>$8.95</price>
<calories>900</calories>
</food>
<food>
<name>French Toast</name>
... (6 Replies)
Discussion started by: cgkmal
6 Replies
7. Programming
Hello All,
Im a Hardware engineer, I have written this script to automate my job. I got stuck in the following location.
CODE:
..
..
...
foreach $key(keys %arr_hash) {
my ($loc,$ind,$add) = split /,/, $arr_hash{$key};
&create_verilog($key, $loc, $ind ,$add);
}
sub create_verilog{... (2 Replies)
Discussion started by: riyasnr007
2 Replies
8. Shell Programming and Scripting
I want to replace a certain pattern with the variable already defined.
e.g.
set path_verilog = /home/priya/bin/verilogfile
my file contents are :
verilog new
verilog is defined here verilog_path_comes
I am using the below command
sed 's/verilog_path_comes/'$path_verilog'/g' <filename>... (2 Replies)
Discussion started by: nehashine
2 Replies
9. Shell Programming and Scripting
Hi. I have a file with asterisk field separators and backslash line terminators. The first field in each line names the line type. I am trying to process each range separately. Here's what the data looks like:
BA*DATA\
LS*DATA1*DATA2*00020*\
TA*DATA1*DATA2*DATA3*\
TA*DATA1*DATA2*DATA3*\... (1 Reply)
Discussion started by: yoi2hot4ya
1 Replies
10. Shell Programming and Scripting
Can I use search & replace in any variable?
Suppose I have one variable named var1 which holds value "abcabc" I need to search 'a' in var1 and want to replace with 'x' like 'xbcxbc'. Is it possible? Can you provide me an example?
Malay (3 Replies)
Discussion started by: malaymaru
3 Replies