Search Results

Search: Posts Made By: av_vinay
26,020
Posted By Leion
Franklin52's solution works better. but i need...
Franklin52's solution works better.
but i need to use nawk in solaris to get it to work.

echo name_abc_20100531_142528.txt |nawk -F"[_.]" '{print $3, $4}'| read d t ;echo $d;echo $t



On...
26,020
Posted By Franklin52
Try: echo name_abc_20100531_142528.txt |awk...
Try:
echo name_abc_20100531_142528.txt |awk -F"[_.]" '{print $3, $4}'| read d t ;echo $d;echo $t
26,020
Posted By Leion
cut can do it too echo...
cut can do it too
echo name_abc_20100531_142528.txt | cut -d_ -f3 | read av ;echo $av
3,380
Posted By Reboot
You can use something like following : #...
You can use something like following :


# S=`ls -l b |awk '{print $5 }'`;P=0
# while [ $P -lt 60 ]
do
size=`ls -l b |awk '{print $5 }'`
echo $size
if [[ "$size" -ne...
3,380
Posted By devtakh
use while loop filesize=`ls -l output.txt...
use while loop

filesize=`ls -l output.txt |awk '{print $5 }'`
cnt=1
echo $filesize
while [1]
do
filesize_new=`ls -l output.txt |awk '{print $5 }'`
if [ $filesize -ne $filesize_new ]
echo...
3,380
Posted By matrixmadhan
sample filesize=`ls -l output.txt |awk '{print...
sample
filesize=`ls -l output.txt |awk '{print $5 }'`
echo $filesize
sleep 60
filesize_2=`ls -l output.txt |awk '{print $5 }'`
if [ $filesize != $filesize_2 ]
then
echo "not equal, it has...
4,834
Posted By jimbmac777
Here is what works as you are requesting...
Here is what works as you are requesting w/explanations...

awk '{sub("004","IND")}{print}' p.txt

Notes:
1. gsub is for replacing ALL occurrences of a pattern in an input line, sub just the...
4,834
Posted By devtakh
IFS=,; while read str rep; do awk -F "|"...
IFS=,;
while read str rep;
do
awk -F "|" -v str=$str -v rep=$rep '$2 == str {gsub(str,rep,$2);print}' OFS="|" file2 ; done < file3


cheers,
Devaraj Takhellambam
4,834
Posted By malcomex999
nawk -F "|" '{gsub("004","IND",$2)}1' OFS="|"...
nawk -F "|" '{gsub("004","IND",$2)}1' OFS="|" filename
30,597
Posted By uniesh
cat al.txt| cut -f2 |sed -e 's/A12/A23/g' ...
cat al.txt| cut -f2 |sed -e 's/A12/A23/g' .......... this may work i m not sure.
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 05:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy