Search Results

Search: Posts Made By: panyam
827
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,515
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,288
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,746
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,316
Posted By panyam
if ( $i ) { ...
if ( $i )
{
print "<entry name=\"KWName"x"\">"$i"</entry>"
x=x+1;
}
3,352
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,583
Posted By panyam
Pls post the sample possible inputs and the...
Pls post the sample possible inputs and the output expected.
2,583
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,919
Posted By panyam
use "cut" command
use "cut" command
5,510
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,598
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,707
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,386
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,292
Posted By panyam
sort -t" " -k1,2 input_file
sort -t" " -k1,2 input_file
3,704
Posted By panyam
no, Something like this: awk -F"[<->]"...
no,

Something like this:

awk -F"[<->]" -v myh=$hostname 'BEGIN { myp="7001" }
2,023
Posted By panyam
Search on "remsh".
Search on "remsh".
1,818
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,462
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,114
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,509
Posted By panyam
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/'...
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/' input_file
1,611
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,652
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,975
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,566
Posted By panyam
Use nawk or /usr/xpg4/bin/awk on Solaris.
Use nawk or /usr/xpg4/bin/awk on Solaris.
16,504
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 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy