10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
We have wrote shell script for multiple file name search pattern.
file format: <numner>_<20180809>.txt
starting with single number and ending with 8 digits number
Command:
awk -v string="12_1234" -v serch="^+_+$" "BEGIN{ if (string ~/serch$/) print string }"
If sting matches... (4 Replies)
Discussion started by: koti_rama
4 Replies
2. 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
3. Shell Programming and Scripting
Hi Forum.
I have the following script that I would like to use a variable to search using awk but it's not working as expected:
# Define working variables
token_search_string=536088
token_search_length=16
This code example works by hardcoding 536088 in the string search:
awk -v... (10 Replies)
Discussion started by: pchang
10 Replies
4. 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
5. Shell Programming and Scripting
Hello,
I'm trying to write a ksh script which will allow me to to search for yesterday's date within a rtf file. I just need someway to know if the date is in the file, echo results to a text file, and then mail that out.
The format of the date is mm/dd/yyyy.
I had to make a variable... (2 Replies)
Discussion started by: ronan1219
2 Replies
6. Shell Programming and Scripting
Hi, could anyone help me with this, tried several times but still not getting it right or having enough grounding to do it outside of javascript: Using awk or sed or bash: need to go through a text file using a for next loop, replacing substrings in the file that consist of a potentially multi... (3 Replies)
Discussion started by: wind
3 Replies
7. SuSE
Hello Linux Masters,
I am not a linux expert therefore i need help from linux gurus.
Well i have a requirement where i need to search all files based on first patterns and after seraching all files then serach second pattern in all files which i have extracted based on first pattern.... (1 Reply)
Discussion started by: Black-Linux
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search.
-Lovin.V (2 Replies)
Discussion started by: lovi_v
2 Replies
9. Shell Programming and Scripting
qwertyuioplkjhgfdsa (1 Reply)
Discussion started by: rorey_breaker
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