Search Results

Search: Posts Made By: panyam
798
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,476
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,258
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,701
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,304
Posted By panyam
if ( $i ) { ...
if ( $i )
{
print "<entry name=\"KWName"x"\">"$i"</entry>"
x=x+1;
}
3,337
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,566
Posted By panyam
Pls post the sample possible inputs and the...
Pls post the sample possible inputs and the output expected.
2,566
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,900
Posted By panyam
use "cut" command
use "cut" command
5,491
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,588
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,704
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,378
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,279
Posted By panyam
sort -t" " -k1,2 input_file
sort -t" " -k1,2 input_file
3,676
Posted By panyam
no, Something like this: awk -F"[<->]"...
no,

Something like this:

awk -F"[<->]" -v myh=$hostname 'BEGIN { myp="7001" }
2,010
Posted By panyam
Search on "remsh".
Search on "remsh".
1,813
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,452
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...
6,062
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,487
Posted By panyam
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/'...
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/' input_file
1,608
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,611
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,968
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,545
Posted By panyam
Use nawk or /usr/xpg4/bin/awk on Solaris.
Use nawk or /usr/xpg4/bin/awk on Solaris.
16,490
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:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy