Search Results

Search: Posts Made By: deepakwins
5,312
Posted By deepakwins
I have a purge script. Based on the Input...
I have a purge script. Based on the Input parameter, the script has to find and delete the files greater than or equal to the nkb. For now, I am using the or condition as you mentioned above.
...
5,312
Posted By deepakwins
Find command size greater than or equalto
How do I find the files greater than or equal to a given size using find command.

find ./ -size +0k --> Lists files greater than 0K

find ./ -size 0k --> Lists the file size equal to 0K.

I...
21,010
Posted By deepakwins
Sorry sir, my bad, I had a typo in my statement....
Sorry sir, my bad, I had a typo in my statement. It perfectly worked.
Thanks for your time RudiC!

Iam still curious for the RegEx option though. :)
21,010
Posted By deepakwins
Thanks for pointing out the obvious Rovf! Some...
Thanks for pointing out the obvious Rovf!
Some how, when I tried the above, it taking anything after "efgh". Its working as if its like "efgh*".
Eg: "efghTest" is also working ok with the check.
...
21,010
Posted By deepakwins
Check if a string starts with certain values and ends with numbers
This is very basic. Yet Iam struggling to get the right pattern for my check.
Apologize in advance to ask a very lame question.

I have to validate if a value of the variable starts with "efgh"...
8,435
Posted By deepakwins
Thanks for the Clarification!
Thanks for the Clarification!
8,435
Posted By deepakwins
Thanks for your time and effort Don!! As I...
Thanks for your time and effort Don!!

As I mentioned, I form the find command based on parameter. So there will be a separate parameter for Directory and a separate param for File names.

eg:
...
8,435
Posted By deepakwins
find command on a empty directory - bad status
when I run the following command in AIX (bash),
find ./*
I get the following error.
find: bad status-- ./*

Thats becasuse, its an empty directory. The same works, when there the directory is...
861
Posted By deepakwins
Iam trying to set the Enviornmental variable, and...
Iam trying to set the Enviornmental variable, and I wanted to store the details under the ENV_VARIABLE. I have more than one parameter value per line time to be stored, hence maintaining the section...
861
Posted By deepakwins
Thanks for pointing it out. I added the Header...
Thanks for pointing it out. I added the Header for the Exceptions too.
861
Posted By deepakwins
Reading reference file
For file purge and archive script, I am planing to have the reference files as below for various file system.


>ReferenceFile.cfg

...
...

DailyArchive:
{
FOLDERS PATERN ...
2,842
Posted By deepakwins
Added the qoute to sample that I had provided.
Added the qoute to sample that I had provided.
2,842
Posted By deepakwins
Replace the unexpected newline char with space in a Fixed width file
Input eg:




Ouput Expected.



The #rd line had the unexpted new line, which need to be replaced with space.

I was planing to go with checking the length of each line using awk and if...
2,932
Posted By deepakwins
Replace a value of Nth field of nth row
Using Awk, how can I achieve the following?

I have set of record numbers, for which, I have to replace the nth field with some values, say spaces.

Eg:
Set of Records : 4,9,10,55,89,etc
I...
1,810
Posted By deepakwins
Thanks Corona!! It worked by changing from...
Thanks Corona!!

It worked by changing from double qoute to single qoute of the sed command.
1,810
Posted By deepakwins
Just edited the my original post!
Just edited the my original post!
1,810
Posted By deepakwins
How to store a escape Sequence in a Variable.?
How to store escape character in the variable.
Var=abc,def,ghi,jkl

echo ${Var} | sed -e "s/,/|\\\\./g;s/^/\\\\./g"
\.abc|\.def|\.ghi|\.hjk

Var1=`echo ${Var} | sed -e "s/,/|\\\./g;s/^/\\\./g"`...
4,966
Posted By deepakwins
Don / Cero, Thanks for your Reply!!! I was...
Don / Cero, Thanks for your Reply!!!

I was intended to say as what Cero interpreted.
The tool that I use, would invoke a "rm" or "/usr/bin/rm" commands.
Operands will be passed to the 'rm'...
4,966
Posted By deepakwins
How to prevent Accidents 'rm -rf *'?
When invoking unix commands from other third party tools (IBM ETL), we run the rm / mv commands with the folder as argument been passed. Eg

rm -rf {folder}/*

when the parameter {folder} did not...
1,564
Posted By deepakwins
awk with If then else.
I have a file with following format.
Line1: 11
Line2: 2
Line3: 10

I need to count the numbers and exit if the total count is greater than zero.

This need to go into a 3rd party scheduler, so...
6,831
Posted By deepakwins
Any option other than chmod? There should be a...
Any option other than chmod?
There should be a way where we can mention the default permision for any new file that are been created right?
If the Current default permission is 664, there should be...
6,831
Posted By deepakwins
How to set default file system permission?
Default file system currently is 664.
I would like to get it as 774.
As other users of the same group was not able execute the file created any any user.
chmod cannot be used in my case. (Files...
5,714
Posted By deepakwins
How to sudo to multiple users?
Hi all,

I have to create SSH public key for multiple users.
Iam creating a script in which, through root, I have to switch to multiple accounts to create SSH keys and then transfer it to the...
26,350
Posted By deepakwins
Grep based on specific columns.
Hi,

How can I grep a record for a value based on specific column.

If I simply do a grep 'AB' FilenName.txt, I might end up getting the records returned whose part of value is 'AB'.

But I...
2,696
Posted By deepakwins
Pivoting a Single column
Hi,

Input

ID|Name
1|a,b,c
2|d,e,f,g

I would like to get output in the following format.

Output

ID|NAME
1|a
1|b
1|c
2|d
2|e
2|f
2|g
Showing results 1 to 25 of 59

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