Search Results

Search: Posts Made By: panyam
684
Posted By panyam
A quick help on python dict
Hi Team,
I'm new to python and working on a project.
I have an API call which returns a dict(got the dict.values() and converted to list) as shown below:
...
3,192
Posted By panyam
Something like this: awk '/100614/...
Something like this:

awk '/100614/ {a=$0;c=1;next} /XXXXX/&&c {b=1;next} /END/ { b=0;next} b { printf "%s %s %s \n",$0,a,FILENAME } ' file1


Extend the same logic to handle all files.
7,590
Posted By panyam
Better to go with a script. Could not recall...
Better to go with a script.

Could not recall any direct command.
1,259
Posted By panyam
if ( $i ) { ...
if ( $i )
{
print "<entry name=\"KWName"x"\">"$i"</entry>"
x=x+1;
}
3,289
Posted By panyam
Hi Avig, Don't hijack others post. Please...
Hi Avig,

Don't hijack others post. Please open a new request.

Regards,
2,541
Posted By panyam
Pls post the sample possible inputs and the...
Pls post the sample possible inputs and the output expected.
2,541
Posted By panyam
Something like this: echo...
Something like this:

echo "RYK11603_PLK5692601_RKYADAV.PDF" | sed 's/\([A-Z0-9].*\)_[A-Z]*\([0-9].*\)_.*/\1_\2.pdf/'


Scrutinizer: Even for me the code provided by "yadavricky" does not gave...
4,863
Posted By panyam
use "cut" command
use "cut" command
5,445
Posted By panyam
At least this worked for me : for fil in...
At least this worked for me :


for fil in `ls -lrt | awk '{ print $NF}' | egrep ".images|.html"`;
do
cp -R $fil /home/oracle
done
1,575
Posted By panyam
What is the content of your script: ....
What is the content of your script:

. ~xcrukusr/.bash_profile_xcruk

?

It seems , $XCR_HOME and $XCR_CFG are not ( are unknown to cron which mean they are not defined )!!!
1,348
Posted By panyam
I am providing you a sample output , apply the...
I am providing you a sample output , apply the same logic to other rows as well.

$ cat file
I-H-2048-10GB-M
I-H-4096-12GB-M
I-H-2048-p1000-M

for id in `cat file`
do
echo "UPDATE...
1,697
Posted By panyam
Do you think , the below command is correct? ...
Do you think , the below command is correct?

find . -type f -name 'T*.xml' > xml_list.txt

"*" will not expand if u are putting it in a " ' " single quote.

refer :
...
1,262
Posted By panyam
sort -t" " -k1,2 input_file
sort -t" " -k1,2 input_file
1,984
Posted By panyam
Search on "remsh".
Search on "remsh".
1,799
Posted By panyam
Use script compiler such as shc to creates a...
Use script compiler such as shc to creates a executable version of your script and pass the same to your colleague.

refer this link for example:
...
5,917
Posted By panyam
Are you capturing the log of the script any...
Are you capturing the log of the script any where?

I guess , the gzip may not be available in path!!!..

Do this,issue below command:

$ which gzip

copy the above path and use it in the...
3,606
Posted By panyam
no, Something like this: awk -F"[<->]"...
no,

Something like this:

awk -F"[<->]" -v myh=$hostname 'BEGIN { myp="7001" }
1,406
Posted By panyam
still not sure what exactly you need.!!! ...
still not sure what exactly you need.!!!

where does $Line in your script comes from?

Assuming that the file content is a file name, something like this should be enough. I assume that...
3,464
Posted By panyam
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/'...
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/' input_file
1,577
Posted By panyam
/home/ravi>awk '/patt1\[0\]patt1/ &&...
/home/ravi>awk '/patt1\[0\]patt1/ && /patt2\[0\]patt2/' input_file | sed 's!.*patt1\[0\]patt1\(.*\)patt2\[0\]patt2.*!\1!'
55,520
Posted By panyam
variable_sto_store=`awk -F"[<>]"...
variable_sto_store=`awk -F"[<>]" '/CFBundleVersion/ {getline;print $3;exit}' input.xml`

If you want to capture it outside.
1,944
Posted By panyam
Hello, The code I suggested should work...
Hello,

The code I suggested should work provided the input format of your file does not change!!!

Tested in my system as below:


SCRIPTS>cat input_file
04/12/12 15:10:25
volume:...
3,487
Posted By panyam
Use nawk or /usr/xpg4/bin/awk on Solaris.
Use nawk or /usr/xpg4/bin/awk on Solaris.
16,461
Posted By panyam
SCRIPTS>awk -F"," '{print...
SCRIPTS>awk -F"," '{print $1,$2,(($3-$4)>0?$3-$4:$3)}' OFS="," input_file
8,291
Posted By panyam
Hello Prateek, There might be no "rank"...
Hello Prateek,

There might be no "rank" function available. But you can tweak an awk and can do it.

Something like this:

TESTBOX>awk -F"|" 'NR==1 { a=$NF; $0=$0 OFS $NF/a} NR >1 { $0=$0...
Showing results 1 to 25 of 101

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