Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: panyam
876
Posted By panyam
How to insert a CSV within xml element tag using Python?
Hi Team,
I have a CSV file which I have to read through and needs to insert the content within an XML file using Python ONLY ( as most of the code base we have in python only). I managed to find the...
283
Posted By panyam
Hi, Managed to find a solution within...
Hi,

Managed to find a solution within python. Can be closed.

for item in dict.values():
...
283
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:
...
1,642
Posted By panyam
How about the below code, touch -d $(date...
How about the below code,

touch -d $(date "+%F") new0000

find . -newer new0000 -type f -size +0
1,642
Posted By panyam
Hi Pinaki, you can use "find" command with...
Hi Pinaki,

you can use "find" command with options "-size" .

To check if its today's file, create a dummy file with touch and use "newer" option of find.

Regards,
Ravi
1,162
Posted By panyam
Hi Mahesh, Can you post the output of below...
Hi Mahesh,

Can you post the output of below command:

sqlplus -s /nolog <<ENDSQL|grep -v 'Connected'>$LOG_FILE
connect $FCP_LOGIN
set feedback off
set heading off
set serveroutput on...
2,419
Posted By panyam
Something like below: head -1 fileA | grep...
Something like below:

head -1 fileA | grep "$(cat fileB)"
if [[ $? -ne 0 ]] ;
then
echo "fileA header does not match with fileB"
exit 1;
fi

Note: even if there is a difference with...
654
Posted By panyam
Hi Rama, Its not clear on what you are...
Hi Rama,

Its not clear on what you are looking for.

Can you share sample input and output you are expecting.
2,517
Posted By panyam
I dont want to use du/df command. Without that is...
I dont want to use du/df command. Without that is there a way

Why ?
524
Posted By panyam
Hi, I don't think it's problem with path...
Hi,

I don't think it's problem with path instead some command which is being used in the script. The command path might be available to ur shell but not to from.
1,679
Posted By panyam
Hi, Not tested your complete code,on paper I...
Hi,
Not tested your complete code,on paper I can see below are wrong.

x= echo $i|cut -f1 -d':'
y= echo $i|cut -f2 -d':'


instead it should be

x=`echo $i|cut -f1 -d':'`
y=`echo $i|cut -f2...
1,013
Posted By panyam
Use "date" command to derive today's &...
Use "date" command to derive today's & yesterday's date and then check the file size (or) checksum to make sure they are different.
2,340
Posted By panyam
Pls, re read my previous post again.
Pls, re read my previous post again.
2,340
Posted By panyam
Hello, If I am correct, you are doing the...
Hello,

If I am correct, you are doing the file listing using "ls -lh", instead you can do just "ls -l" which make sure that file sizes are listed in bytes.

if you do so, it would be easy to add...
623
Posted By panyam
echo $FilePath | cut -d"/" -f1 echo...
echo $FilePath | cut -d"/" -f1

echo "$FilePath" | sed 's/$HOST_NAME_LAND//'
810
Posted By panyam
Hi, I'm sorry but did not understand your...
Hi,

I'm sorry but did not understand your question correctly. Can you post sample input and expected output.

Regards,
Ravi
1,605
Posted By panyam
Why can't you use put GPS_input*.txt ? You...
Why can't you use put GPS_input*.txt ?

You want to match only GPS_input.txt and GPS_input2.txt?
3,308
Posted By panyam
Does the below helps? for DISK in...
Does the below helps?

for DISK in /dev/dsk/c*t*d*s*;
do
value=`prtvtoc "$DISK" | sed -n -e '/Dimensions/,/Flags/{/Dimensions/d; /Flags/d; p; }' | sed -n -e '/sectors\/track/p'`;
if [ -n...
1,605
Posted By panyam
I'm under linux env and below is the code working...
I'm under linux env and below is the code working for me.

[mzadmin@local103 ~]$ sftp user@remote104
Connecting to remote104...
user@sai104's password:
sftp> cd /home/user/TEST
sftp> put...
3,308
Posted By panyam
redirect "Your command output to a sed and do...
redirect "Your command output to a sed and do replace '*' with space and then do a sort -u on it"
1,605
Posted By panyam
This worked for me: sftp> put...
This worked for me:

sftp> put GPS_input[1-2].txt
1,039
Posted By panyam
Still not clear. Please post sample input...
Still not clear.

Please post sample input and expected output.
2,626
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.
5,654
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,423
Posted By panyam
Hi All, Thanks for the reply. I got the...
Hi All,

Thanks for the reply.

I got the issue resolved myself and forgot to update here.

The logic I used is:

awk -F"|" 'BEGIN{ read the source file and store in array} { for each record...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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