Search Results

Search: Posts Made By: gotam
14,359
Posted By gotam
thanks, its working now. :)
thanks,
its working now. :)
14,359
Posted By gotam
deleting all the files inside a directory from a relative path
I have a file inside abc/def/ghi directory. let say a.txt
I need to delete this a.txt from abc itself.
I have tried

ls /abc/def/ghi | xargs rm -r
its saying
rm: a.txt non-existent


also...
2,600
Posted By gotam
cron job is unable to process
Hi All,
I have got a shell script that excutes some job and mails me the output as an attachment.
While running the script manually, its perfect.
when i am scheduling the job through crontab, i am...
2,400
Posted By gotam
scanning the file for a particular column
I have a file containing 4 columns.
need to scan that file, if all the rows in the column4 have a value ZERO, it should print "everything is fine".
And if all are not ZERO , at the first encounter...
10,472
Posted By gotam
Yes, its working now. Thanks :)
Yes, its working now.
Thanks :)
10,472
Posted By gotam
my code is #!/bin/ksh FILE=$1 awk 'NR > 3...
my code is
#!/bin/ksh
FILE=$1
awk 'NR > 3 && nr - 3 > NR {
print $4 == 0 ? "fine" : "some problem"
}' nr="$(wc -l < $FILE)" $FILE

the error m getting is
syntax error The source line is...
10,472
Posted By gotam
Hi Radoulov, thanks for responding. Thing is...
Hi Radoulov,
thanks for responding.
Thing is that, The piece of codfe that you have provided produced syntax error,even though I could understand the logic behind your code.
After that, I tried to...
10,472
Posted By gotam
Not sure what is the syntax error over here. ...
Not sure what is the syntax error over here.
its saying
syntax error The source line is 2.
The error context is
>>> while <<< (NR > 3) {
awk: Quitting
The source line is...
10,472
Posted By gotam
Skip first and last n records with awk
Hi,
I have an awk code that reads an input file, checks the 4th column and tells if its fine.

#!/bin/ksh
{ if ($4 == 0)
print "fine"
else
print "some problem" }' FILENAME
My problem is that,...
1,025
Posted By gotam
Thanks Methyl, YEs u r true. Thanks for the...
Thanks Methyl,
YEs u r true. Thanks for the tips. :)

OFS_BALA_BILLING_IN\t SCHEDULED\t 22992\t 0$
OFS_BALA_BILLING_IN_NEW SCHEDULED\t 22992\t 0$
OS_BAL_MPRTD_IN \t ...
1,025
Posted By gotam
@danmero.. Thanks buddy.. i got it working ...
@danmero..
Thanks buddy.. i got it working

@Anchal,
Thanks for the reply.
And yes I have tried that way too. but its giving me same unexpected result.[i think the reason is where the length of...
1,025
Posted By gotam
cut operation is not helping me much
hi,
i have a file where I want to extract the the failure count [4th column]only from the file.

JOB_NAME STATE RUN_COUNT FAILURE_COUNT...
3,584
Posted By gotam
Thanks Cero.. :) Thanks Scottn ls...
Thanks Cero.. :)

Thanks Scottn
ls BAL100005* | xargs -I{} mv {} BAL100005.10000000
this one worked :)
though i am blank, how it worked.
3,584
Posted By gotam
Thanks Scottn, but I am still getting the same...
Thanks Scottn,
but I am still getting the same error.
even tried with some other options aswell.

Just to mention, I have managed the very issue by asking the clienet to resend the file.
but,...
3,584
Posted By gotam
hi, i can see $ ls -d *BAL100005* | od -c ...
hi, i can see

$ ls -d *BAL100005* | od -c
0000000 B A L 1 0 0 0 0 5 . 1 0 0 0 0 0
0000020 0 0 032 \n
0000024
3,584
Posted By gotam
not able to view the file
Hi All,
I am experiencing a strange and serious issue.
I can see, a file exist there inside a directory
while doing cat i can see the file exists, but while trying to view that its saying NO such...
11,099
Posted By gotam
Thanks all
But, all of those solutions are are causing
all the 0 size files to be removed recursively from its child directories .

my requirement is to remove the 0 size files from the current directory...
11,099
Posted By gotam
deleting all files with 0 size
I tried with

find . -maxdepth 1 -type f -size 0 | xargs rm -f


but, getting the error
find: bad option -maxdepth

seems maxdepth is not there in my system. m using HP-UX
Please help.
3,562
Posted By gotam
It worked..... thanks so muchh :) Have a...
It worked.....
thanks so muchh :)
Have a great day boss.
3,562
Posted By gotam
Thanks for pointing that out. Right now my...
Thanks for pointing that out.

Right now my code is


#!/bin/ksh
var=$(awk -f: '$nf=="Y"{print $2}' /bbsbtest/data/atuat3/gtmstuff/file.txt)
echo $var



and the error i am getting is...
3,562
Posted By gotam
Thanks for the help. But, I dont have awk...
Thanks for the help.
But, I dont have awk facility in my unix, it seems.
when i ran this it says


AWK: not found
3,562
Posted By gotam
reading line by line and cut
I have a file like name file.txt whose contents are 3 fields separated by colon':' . somewhat like

code/OR_R1400_RC4/BM_ATEMP_11.0.1.33:28/01/2010:N...
11,512
Posted By gotam
but it will work where the owner has only execute...
but it will work where the owner has only execute permission
if the owner will have some other permision added to execute it wont show

Sorry, If i was not clear in describing my issue in prev...
11,512
Posted By gotam
search files with owner having execute permission
Hi All,
I have to search for all files in the current directory where the owner having execute operation.

I can find the files with specific permission such as 666

find . -type f -perm 666
...
3,789
Posted By gotam
yes thats true !! i was happy assuming that it...
yes thats true !!
i was happy assuming that it got resolved
you made me to fry my brain again .
thanks for pointing that out !! i'll work on it and post the finding :)
Showing results 1 to 25 of 40

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