Search Results

Search: Posts Made By: Pradhikshan
1,669
Posted By Pradhikshan
Search for a pattern in a file and split the line into two lines
Hi All,

Greetings everyone !!!

I have a file which has many lines, out of which one line is as below.



I need to search for pattern "varchar(30) Select" and if exists, then split the line...
1,708
Posted By Pradhikshan
Please find the screenshot of names retrieved in...
Please find the screenshot of names retrieved in the file. I have highlighted the overlapped line.
1,708
Posted By Pradhikshan
Its not like all the file names are overlapping....
Its not like all the file names are overlapping. Only few of the file names are getting overlapped in a single line. I have around 2832 files in a dir. When i executed the command , i just got 2751...
1,708
Posted By Pradhikshan
Retrieving names of files in a dir without overlapping
Hi,

I have been trying to retrieve the names of files present in a directory one by one but the names of files are getting overlapped on one another.

I tried the below command.
ls -1 >...
4,917
Posted By Pradhikshan
Its working. Thanks. But when my replacement...
Its working. Thanks. But when my replacement string goes beyond 255 characters, its throwing error. Can you please provide any solution if I need to replace with a string having more than 255...
4,917
Posted By Pradhikshan
Hi Ravinder, thanks for ur reply. Is there any...
Hi Ravinder, thanks for ur reply. Is there any other way to achieve this without -i as sed with -i was not working in my machine.
4,917
Posted By Pradhikshan
Thanks for your reply but i would like to delete...
Thanks for your reply but i would like to delete the line that has the matching string and then replace the line with new string.
4,917
Posted By Pradhikshan
Search for a string,delete the line and replace with new string in a file
Hi Everyone,

I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and...
14,300
Posted By Pradhikshan
Hi Don, Thank you so much. It worked. ...
Hi Don,

Thank you so much. It worked.

I tried the below command using awk which also worked.

awk '{if(substr($0,45,2)=="02") printf (substr($0,1,358) " " substr($0,360,length($0))...
14,300
Posted By Pradhikshan
I tried the below sed command. sed...
I tried the below sed command.

sed '/(^.\{44\}\)02/s/\(^.\{358\}\).\{1\}\(.*\)/\1 \2/'

but didnt work out.
14,300
Posted By Pradhikshan
I tried with sed but it didnt work. Am using korn...
I tried with sed but it didnt work. Am using korn shell.
14,300
Posted By Pradhikshan
Search for a string at a particular position and replace with blank based on position
Hi,

I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank....
Showing results 1 to 12 of 12

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