Search Results

Search: Posts Made By: dvah
2
sed
1,091
Posted By dvah
sed
hi,

Please can help me how to apply sed for the below scenario.

I need to search for a string in a file and if it exists in a line i need to replace the 5th string in that line with another...
767
Posted By dvah
help with awk command
hi,

i've a file with few rows that ends with a comma(,). I need to fetch just those lines and merge them in to a single line and remove the last comma







Thanks
3,222
Posted By dvah
Thanks, but i've to run my script part of a job,...
Thanks, but i've to run my script part of a job, so it would be better if i've the time processing part of my script.
3,222
Posted By dvah
datetime difference in seconds
Hi,

I'm trying to find processing time of my script. Please can someone give me the commands to get the start/end time in "dd-mm-yyyy hh:mm:ss" and the differnce in seconds.



Thanks!
990
Posted By dvah
awk command
Hi



o/p - condition size < 16
695
Posted By dvah
o/p in one line
hi is there any command that get me the output in one line?

for ex - ls - this ll show the files line by line, but i need that to be displayed in a single line.

Thanks
985
Posted By dvah
awk command
hi,



o/p



the awk command i use is



Is it possible to do this in a single awk instead of two

Thanks
1,435
Posted By dvah
sort command
i/p file


o/p file
1,295
Posted By dvah
Thanks. This works perfect. But if you dont...
Thanks. This works perfect.

But if you dont mind, can you pls give a brief explanation of ths command. It'll be really helpful to improve my awk knowledge.

Thanks once again!
1,295
Posted By dvah
awk command
Hi,

I just need a awk command to get the below task.

infile-


o/p


Thanks.
1,264
Posted By dvah
input value to a command thru shell
Hi,

I'm trying to create files in ccm thru a shell as the number of files that i need to create is in hundreds





The problem here is the command prompts for the file type to be...
1,093
Posted By dvah
This works fine, but may i know what this...
This works fine, but may i know what this condition does.
1,093
Posted By dvah
help with awk command
Hi,

I need a awk command to identify a few pattern in a file and delete them.

Rule - Delete lines that has single/multi space within double quotes





Thanks.
1,299
Posted By dvah
2,450
Posted By dvah
sed command to delete line
HI,

Im using the below commmand to delete lines having "(" at the start of a line.

sed -e '/^(/d'

But i need a command to delete lines that has only "(" in it and no other strings.
...
17,948
Posted By dvah
I managed to do it with this command
I managed to do it with this command
17,948
Posted By dvah
Thanks, but this command replaces each space/tab...
Thanks, but this command replaces each space/tab with a delimiter which i dont expect. And i have removed the i option as it is not supported in my machine.
17,948
Posted By dvah
Sorry but my machine doesnt supports ruby command.
Sorry but my machine doesnt supports ruby command.
14,079
Posted By dvah
ls -l | awk '{print $9, $5}'
ls -l | awk '{print $9, $5}'
1,706
Posted By dvah
While read line do echo "DELETE FROM...
While read line
do
echo "DELETE FROM TRS_ONE_ATDE WHERE DATA_DT =", $line >> $SCRIPT_FILE
done < $DBLIST
17,948
Posted By dvah
Sorry but this command fails for multiple...
Sorry but this command fails for multiple spaces/tabs.
3,556
Posted By dvah
remove duplicates and sort
Hi,

I'm using the below command to sort and remove duplicates in a file. But, i need to make this applied to the same file instead of directing it to another.



Thanks
17,948
Posted By dvah
replace spaces/tabs with delimiter |
Hi,

I'm looking for a command that replaces spaces/tabs with pipe symbol and store the result to the same file instead of routing it to another file.

infile


outfile


Thanks.
830
Posted By dvah
sed \ with \\
Hi,

Can i have teh sed command to replace the character \ with \\

Thanks
1,482
Posted By dvah
Thanks. This works perfect. I just tried...
Thanks. This works perfect.

I just tried this with my own lengthy script, that works fine too.


while read line
do
if [ `echo $line | grep "create table " | wc -l` -gt 0 ]
then
...
Showing results 1 to 25 of 71

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