Search Results

Search: Posts Made By: panyam
664
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:
...
11,386
Posted By panyam
Depends on how your config file is!!! Pls...
Depends on how your config file is!!!

Pls post sample input (both config and folder) and expected output.

Regards
Ravi
3,186
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,568
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,248
Posted By panyam
if ( $i ) { ...
if ( $i )
{
print "<entry name=\"KWName"x"\">"$i"</entry>"
x=x+1;
}
3,281
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,537
Posted By panyam
Pls post the sample possible inputs and the...
Pls post the sample possible inputs and the output expected.
2,537
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,844
Posted By panyam
use "cut" command
use "cut" command
5,424
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,572
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,691
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,339
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,260
Posted By panyam
sort -t" " -k1,2 input_file
sort -t" " -k1,2 input_file
3,569
Posted By panyam
no, Something like this: awk -F"[<->]"...
no,

Something like this:

awk -F"[<->]" -v myh=$hostname 'BEGIN { myp="7001" }
1,974
Posted By panyam
Search on "remsh".
Search on "remsh".
1,797
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:
...
1,394
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...
5,892
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,461
Posted By panyam
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/'...
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/' input_file
1,574
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,491
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,941
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,466
Posted By panyam
Use nawk or /usr/xpg4/bin/awk on Solaris.
Use nawk or /usr/xpg4/bin/awk on Solaris.
16,436
Posted By panyam
SCRIPTS>awk -F"," '{print...
SCRIPTS>awk -F"," '{print $1,$2,(($3-$4)>0?$3-$4:$3)}' OFS="," input_file
Showing results 1 to 25 of 101

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