awk variable search and line count between variable-search pattern
Input:
Every single run of the Rsync is having a number of files being transferred during the session.
I have successfully extracted time duration of the Rsync duration, but I can't understand how to calculate number of files being transferred during this one particular ( among many ).
Current, output of the script is like :
What I'm looking for is the count of files during these Rsync sessions.
If I take a look at the variable search, I found it is impossible for me to make a variable based search.
Hi
I want to read a file line by line and search for a particular string in each line(say for example string containing @ )and save that string into a variable.
Can someone suggest me the way to implement it.I am using K- shell
Thanks
Ishita (5 Replies)
For a Script I need to detemine which field of the unix environment variable SHLIB_PATH has the
WALTDB entry.
export SHLIB_PATH=/usr/user5/WALTDB/oracle/product/10.2.0/lib32:/usr/TZD/bin.wdad/mug/oracle/lib:
echo $SHLIB_PATH | awk -F: '{ print $1 }'
Shure gives me the first entry, but... (6 Replies)
guys,
I need to know how to assing pattern matched string as an input command variable. Here it goes'
My script is something like this.
./routing.sh <Server> <enable|disable>
## This Script takes an input <Server> variable from this line of the script ##
echo $1 | egrep... (1 Reply)
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)
Im trying to parse ifconfig with awk and setup a bunch of variables in one shot. But Im having trouble figuring out how to work with data in previous lines.
ifconfig output:
eth0 Link encap:Ethernet HWaddr 00:50:DA:10:7F:1B
inet addr:10.10.10.10 Bcast:10.10.10.127 ... (0 Replies)
hi,
i have a variable which contains some file names delimited by a single space.
FNAME="s1.txt s2.lst s3.cvs s4.lst"
i have another variable that contains a pattern
FILE_PATTERN="*.lst"
i want to take the filenames from FNAME variable and assign each file name in to an array say
for... (8 Replies)
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)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
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)
Hi,
I have a working script.
It does what I am intending it to but a bit confused whether the sed part is supposed to be working or not. Further down is the script with the sed part that should have been working but not and the grep -v part which is the workaround that I am using at the... (10 Replies)