Search Results

Search: Posts Made By: ginrkf
2,460
Posted By ginrkf
Thanks a lot
Thanks a lot
2,460
Posted By ginrkf
Hi it should run only every 9th time the script...
Hi it should run only every 9th time the script is running.If the file is there yes we need to execute hi and quit
2,460
Posted By ginrkf
Run a command once in three hours
Hi All,

I have a bash script which is scheduled to run for every 20 minutes. Inside the bash script, one command which I am using need to be triggered only once in two or three hours.Is there...
1,741
Posted By ginrkf
Thanks All.. Both the code works for me
Thanks All.. Both the code works for me
1,741
Posted By ginrkf
Problem with If statement
Hi All,

I am writing an if statement to check multiple conditions, but when I try to execute the script it is breaking at the point of if statement by showing the issue below.



Code I am...
781
Posted By ginrkf
Thank you.. So just for my understanding @reboot...
Thank you.. So just for my understanding @reboot root rm -f /path/to/Reb.Lck, this code will remove the Lck file immediately after the server reboot.
781
Posted By ginrkf
Linux Reboot
Hi Team,

I have a requirement where I need to execute couple of commands once whenever my server is rebooted.For example I used to receive a mail telling there is a planned server reboot for the...
3,957
Posted By ginrkf
Thanks Rudic, I used something like this awk...
Thanks Rudic, I used something like this

awk -F, '$2=="SRC1" {print $0}' sample.txt
awk -F, '$2!="SRC1" {print $0}' sample.txt
3,957
Posted By ginrkf
To Split the file based on column value
Hi Team,

I have a requirement in such a way that need to split the file into two based on which column particular value appears.Please find my sample file below.
Lets consider the delimiter of...
1,336
Posted By ginrkf
I tried with is Running also, but didn't work ...
I tried with is Running also, but didn't work

------ Post updated at 03:32 AM ------

Its working, Actually there was a minor issue in my code :-)
1,336
Posted By ginrkf
Hi All, Now my requirement is change, but almost...
Hi All, Now my requirement is change, but almost similar to the above one. But using the above code it is not working.I tried different option but its not giving correctly.

My input file is given...
1,336
Posted By ginrkf
This is printing as expected in the file. But its...
This is printing as expected in the file. But its not changing inside that file..Is there any option make that change inside the file itsel

------ Post updated at 06:08 AM ------

Thanks a lot...
1,336
Posted By ginrkf
To group records in the file in UNIX
Hi All,

I am using RHEL 6.9. I got a requirement to group the records in a file.The file content as shown below.

#### FAILED JOBS IN XXX #####

1> ABCD failed in the project XXX
2> HJK Job...
1,168
Posted By ginrkf
For loop with space in file name
Hi All

I have a source file named ABC-20150613 to 20150613.zip. I was trying to execute the below command on this source file, but its telling file is not available in that path and giving me some...
1,630
Posted By ginrkf
Sorting based on File name
Hi All

I have a requirement to list all the files in chronological order based on the date value in the file name.For ex if I have three files as given below

ABC_TEST_20160103_1012.txt...
1,534
Posted By ginrkf
hi Please find my answers below inline ...
hi

Please find my answers below inline

Is this a homework assignment? If not, how will this information be used?

--> This is part of my project work.Actually I am writing a job , where we...
1,534
Posted By ginrkf
File with data
My requirement is to find out data in any of the file in particular path.

I am using UNIX OS.

For example I have two files. A123.rej & A345.rej

A123.rej contain data

123,456

A345.rej...
1,029
Posted By ginrkf
Actually my requirement is to find out where the...
Actually my requirement is to find out where the number of columns present in the file is same a predefined.

I have two files A & B

A is suppose to have three columns and is a pipe delimited...
1,029
Posted By ginrkf
Number of columns
Hi All

I am using the below code to check the number of columns in a delimited file are same as expected. Code is give below

awk -F '|' -v line=$2 'NF!=line {print NF,$0}' file

Here the...
861
Posted By ginrkf
Ok You can leave ignore my previous post.So let...
Ok You can leave ignore my previous post.So let me put my requirement here.

I have a pipe delimited file. I am trying to create a UNIX script which can be used across different files to print the...
861
Posted By ginrkf
Duplicate check by passing external parameter
I have a code which is using to find duplicates in a files based on column.Below is the same code which is used to find duplicates in my file based on column 1

awk -F'|' '{if (x[$1]) {...
3,900
Posted By ginrkf
Hi, I have modified the same script in such...
Hi,

I have modified the same script in such way that I can pass the value as an external parameter while running.

vi test_script.sh

a=$1
awk -F"|" 'function verify(var){
...
3,900
Posted By ginrkf
Hi Ravinder The code is showing me some...
Hi Ravinder

The code is showing me some syntax error.
awk: cmd. line:12: else {
awk: cmd. line:12: ^ syntax...
3,900
Posted By ginrkf
Thanks to all for your inputs.The below code is...
Thanks to all for your inputs.The below code is working
awk -F"|" 'function verify(var){
num=split(var, A);
for(i...
3,900
Posted By ginrkf
Hi Please find my sample file File1 ...
Hi Please find my sample file

File1
123,asd,fgh,nmb,pok
134,,fg,mnm,mnb

For the above file I need to reject the second record as the second column contain null value.

File2
...
Showing results 1 to 25 of 72

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