Search Results

Search: Posts Made By: Vidhyaprakash
16,864
Posted By Vidhyaprakash
sed REGEX to print multiple occurrences of a pattern from a line
I have a line that I need to parse through and extract a pattern that occurs multiple times in it.

Example line:


getInfoCall: [ call=1 origin=AAAA ] info received please proceed, getInfoCall:...
822
Posted By Vidhyaprakash
works fine.... :b: thanks a lot!!!
works fine.... :b: thanks a lot!!!
822
Posted By Vidhyaprakash
replacing \ with / in a file
I have a file as below:


1578449 |\\DEV-HUB1\WB_Enterprise_MAM\\4-5-2011\dsuggTO\E0003908_2692725_30.jpg
1578450 |\\DEV-HUB1\WB_Enterprise_MAM\\4-5-2011\dsuggTO\E0003908_2692725_31.jpg
1578451...
4,670
Posted By Vidhyaprakash
try this awk -F"|" '{for(i=1;i<=NF;i++)...
try this

awk -F"|" '{for(i=1;i<=NF;i++) {if($i != "") print $i"|";}}' input
7,265
Posted By Vidhyaprakash
Solaris
Solaris
7,265
Posted By Vidhyaprakash
automatic SFTP without doing passwordless key with ssh-keygen
I need to automate a file transfer thru SFTP. But I cannot do a passwordless key with ssh-keygen between the servers. Is there any other way like we do something like below in FTP???

ftp -n...
1,888
Posted By Vidhyaprakash
while read first do while read second ...
while read first
do
while read second
do
echo $second >> newfile.txt
[ "$second" = "$first" ] && echo "is a fruit" >> newfile.txt
done<secondfile.txt
done<firstfile.txt
16,897
Posted By Vidhyaprakash
yes... I am planning to do that... I also...
yes... I am planning to do that...

I also thought of
telnet IP 22 << ! >1.log
^]
q
!
where 22 is default port

but this may create give me failure if telnet on the remote is down and not...
16,897
Posted By Vidhyaprakash
to check if a remote server is up
I need to check if a remote server is up before i send a file to it through FTP. I thought of using "ping" command to check it. But the problem is, my script needs to run from 2 different servers,...
2,487
Posted By Vidhyaprakash
thanks a lot balaje!!!!
thanks a lot balaje!!!!
2,487
Posted By Vidhyaprakash
meaning of today=${1:-${today}}
what does today=${1:-${today}} mean???

I saw a script which has these two lines:
today=`date '+%y%m%d'`
today=${1:-${today}}

but both gives the same value for $today

...
2,119
Posted By Vidhyaprakash
while read line do echo $line | awk...
while read line
do
echo $line | awk '{print $1, $NR}'
done<filename
1,277
Posted By Vidhyaprakash
try $2 == i
try $2 == i
Forum: AIX 02-29-2012
7,522
Posted By Vidhyaprakash
What executable is that? And which program was it...
What executable is that? And which program was it written in?
1,632
Posted By Vidhyaprakash
Bourne shell "sh" does not support this... ...
Bourne shell "sh" does not support this...
s=(`ls -lrth /2702/ | awk '{print $9;}' | sed s/iostat.// | cut -c5-6`)

use bash...
2,511
Posted By Vidhyaprakash
Can you give a sample input and sample output you...
Can you give a sample input and sample output you are expecting please???
2,511
Posted By Vidhyaprakash
Try using printf instead of print...
Try using printf instead of print...
8,760
Posted By Vidhyaprakash
Scrut - AWEEEESSOMMMMEEEEE!!!! ...
Scrut - AWEEEESSOMMMMEEEEE!!!!

/usr/xpg4/bin/awk simply works!!
Possibly I have an older awk version...

Thanks a lot everyone!!! :) :D :)
8,760
Posted By Vidhyaprakash
may be the reason is i have the older version of...
may be the reason is i have the older version of awk???
4,683
Posted By Vidhyaprakash
I get 5 columns... :( ...
I get 5 columns... :(


============================
Menu Rotation
============================
1) Rotation 1 3) Rotation 3 5) Rotation 5 7) Rotation 7 9) Back
2) Rotation 2 ...
8,760
Posted By Vidhyaprakash
AWK for multiple line records RS="^" FS="#"
I have to pull multiple line records with ^ as the record separator(RS)... # should be my field separator (FS)...

Sample record is:

^-60#ORA-00060: deadlock detected while waiting for...
Showing results 1 to 21 of 21

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