Search Results

Search: Posts Made By: bharath561989
1,886
Posted By bharath561989
Thank you Don and Rubi. I am working on the...
Thank you Don and Rubi. I am working on the solution based on your inputs. will post the code once its ready.

Thanks
Bharat
1,886
Posted By bharath561989
Hi Don, Thank you. Would be helpful if you...
Hi Don,

Thank you.
Would be helpful if you can provide an example to use find -ctime. I need to lst the file which created from 06-MAR-2017 to 08-MAR-2017.



$ find . -ctime...
1,886
Posted By bharath561989
Hi Chubler, Thanks for your reply. I have...
Hi Chubler,

Thanks for your reply.
I have the flexibility of change the DDMMYYYYHHMMSS format to YYYYMMDDHHMMSS. And yes it makes sense. I will make this change. But in the below code is there...
1,886
Posted By bharath561989
Hi Jim, Thanks a lot for your reply. In my...
Hi Jim,

Thanks a lot for your reply.
In my case timestamp is already in the file name. so i just need to select the files which meets the date range. Lets say i have below files.

f1_1
f1_2...
1,886
Posted By bharath561989
Program to search for the files with specific format
Hi All,

Your help on the below requirement is highly appreciated.
I am building a program which should pick the file from a source directory and place them into target directory. While selecting...
5,172
Posted By bharath561989
Hi Team, My requirement is slightly changed...
Hi Team,

My requirement is slightly changed and please help on the below.

Earlier i was trying insert a character(I) at 180th position of all the lines in the file except 1st and last line. Now...
971
Posted By bharath561989
Thanks a lot. I will test this and let you know. ...
Thanks a lot. I will test this and let you know.

Thanks
Bharat
971
Posted By bharath561989
Replace Language Specific Characters in File
Hi Team,

I have requirement to replace Language Specific Characters in File.
We have set of characters, it should be replaced to a different character in the file.


I have around 38...
1,574
Posted By bharath561989
Thanks Don. I think for loop helps my requirement...
Thanks Don. I think for loop helps my requirement as i do not want to search the sub directories.

Thanks a lot guys.

Thanks
Bharat
1,574
Posted By bharath561989
Thanks Everyone. Scrutinizer solution...
Thanks Everyone.

Scrutinizer solution working fine. Below is the code. I will try the other solution too.


#!/bin/ksh
echo "Program Begin"
cd /home/bhegde
for file in *.RET
do
if [ -f...
5,172
Posted By bharath561989
Thank you. I will try this and update you. ...
Thank you. I will try this and update you.

Thanks
Bharat

---------- Post updated at 12:05 PM ---------- Previous update was at 11:37 AM ----------

It works. Just fine. Thanks a lot.


...
1,574
Posted By bharath561989
Issue with for loop
Hi Team,

I have for loop in my shell script. Which basically loop through all files in the directory, When some files are in the directory it works just fine.

But if there are no files at...
5,172
Posted By bharath561989
Hi Rudi, Thanks for the reply. Yes you are...
Hi Rudi,

Thanks for the reply.
Yes you are right. it should be line.

Thanks
Bharat
5,172
Posted By bharath561989
Hi Don, I tested this and works perfectly...
Hi Don,

I tested this and works perfectly fine. I have one more requirement with the same operation. If 180th position already have character "I". i do not want to touch that file. I am not...
5,172
Posted By bharath561989
Hi Don, Thanks for your detailed explanation...
Hi Don,

Thanks for your detailed explanation and solution. I will try this approach and update you.

Thanks
Bharat
5,172
Posted By bharath561989
Hi greet, With option -i, its not working..i...
Hi greet,

With option -i, its not working..i get below error.


$ sh test2.prog
Program Begin
File Name= abc.txt
sed: illegal option -- i
Usage: sed [-n] [-u] Script [File ...]
...
5,172
Posted By bharath561989
Hi greet, Yeah. Now its working. Thanks a...
Hi greet,

Yeah. Now its working. Thanks a lot. You told me i can edit and save the file with the option -i. Could you please let me know how to do that.

Thanks a lot for your help. Below is...
5,172
Posted By bharath561989
Hi Greet, Again i tried with .txt files. But...
Hi Greet,

Again i tried with .txt files. But i get similar error.



I am attaching both the file used and shell script. Please help. Is it something to do with my unix version or something?
...
5,172
Posted By bharath561989
Hi Greet, Thanks for the quick reply.Sorry i...
Hi Greet,

Thanks for the quick reply.Sorry i am new to shell scripting.

Below is the content of the file
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX 293800206774 XXXXXXXXXXXXXXXXX ...
5,172
Posted By bharath561989
Hi greet, When i try like this. I get an...
Hi greet,

When i try like this. I get an error:
sed: Function 1{n};$!s/./&I/10 cannot be parsed.
Below is the code i tried.

#Loop throguh all the lines in the file and insert I in 180...
5,172
Posted By bharath561989
Insert character at specific location in a each line of the file
Hi All,


I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script

for file in...
Showing results 1 to 21 of 21

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