Search Results

Search: Posts Made By: sunil_neha
21,212
Posted By sunil_neha
get last character in a file
HI,

I want to find if the last character in a file (with many records i.e. many new line chars) is a new line \n or not?

Basically i want to know that if last line has a newline character at...
11,587
Posted By sunil_neha
i want to do this in unix shell script...
i want to do this in unix shell script...
11,587
Posted By sunil_neha
Lock a file. AND Wait if file is locked
Hi,

I want to do the foll steps:

1. Check if someone has a lock on my file1.
2. if file1 is locked by any other user
wait in a loop till another user releases lock
3. when lock...
59,234
Posted By sunil_neha
taking the entire file in a variable and applying...
taking the entire file in a variable and applying sed WORKS...

total_xml_msg=`cat $input_file`
echo $total_xml_msg | sed 's/<eCRMver1:Consumer>/\
<eCRMver1:Consumer>/g' > $temp_output_file1
...
59,234
Posted By sunil_neha
I tried the foll. command: awk ...
I tried the foll. command:

awk '{gsub(/<eCRMver1:Consumer>/, "\n<eCRMver1:Consumer>"); gsub(/<\/eCRMver1:message>/, "\n<\/eCRMver1:message>");print}' $input_file > $tem
p_output_file1

ERROR:...
59,234
Posted By sunil_neha
thanks a lot it has worked
thanks a lot it has worked
59,234
Posted By sunil_neha
Inserting new line after match of a fixed string
Hi,

I have a file which contains many occurances of a string say "hellosunil".

I want to insert a newline charcater after all the "hellosunil" strings in the file.

trying to use sed,

sed...
Showing results 1 to 7 of 7

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