Search Results

Search: Posts Made By: API
4,165
Posted By API
Tx for this answer. I will check this.
Tx for this answer. I will check this.
4,165
Posted By API
Change 2 values in 2 different lines
Hello all,

I have a file looks like a xml file:


....
<SrcIntDef>WAUXDFXXX<\SrcIntDef>
<SrcIntRep>WUBGIUNXXX<\SrcIntRep>
...


For these 2 lines I will change the values. So for result...
3,704
Posted By API
Thanks for this hint. As you wrote it it maybe...
Thanks for this hint. As you wrote it it maybe better to add the final newline within the Editor... A question I have to think about...
3,704
Posted By API
@bakunin: Yes - this helps a lot. Thats means I...
@bakunin: Yes - this helps a lot. Thats means I have no Chance to see a file without a newline character in vim. With 'od' I will see the real world - as it is.

Thanks for that good Explanation.
3,704
Posted By API
Hello all, I am using: RedHat Linux...
Hello all,


I am using: RedHat Linux 3.10.0-862.el7.x86_64


I am working under: BASH_VERSION='4.2.46(2)-release'


The hex Editor is from vim (:%!xxd).

------ Post updated at 02:05 PM...
3,704
Posted By API
No newline at end of file
Hello all,


I have maybe a simple Problem - but I do not know to handle it.


All what I want, is to write a line to file without a newline at the end. It works with "echo -n" for all lines,...
1,507
Posted By API
Thanks for this hint. It was not the...
Thanks for this hint.


It was not the solution for my Problem - but you gave me a hint to solve it. The Problem I had has been at another Point.


Therefor thanks for it
1,507
Posted By API
Writing umlauts to a file
Hello all,


I have a strange Problem with writing umlauts like (ä, ü) to a file, which has an ISO-8859-1 Encoding.


My Shell-script is reading a file. The Encoding differs. Sometimes US-ASCII,...
1,038
Posted By API
Ah yes! Thanks for your Explanation...
Ah yes! Thanks for your Explanation...
1,038
Posted By API
Thats very good. It seems to be working... But...
Thats very good. It seems to be working...
But I have a question to the second command:
s/^\n\|\n$//g' You are replacing all LFs to nothing? Then no LF would be there anymore? Ok, it works, but I...
1,038
Posted By API
Yes, you are right. As I see my examples - it...
Yes, you are right. As I see my examples - it would work.

But, what if I have a line - like (I forgot this case):

Discont;23.09;34\n\r
Discont;11.09;54\r
Discont;11.43;66\n
1,038
Posted By API
Normally each record within a file have a line...
Normally each record within a file have a line end like <LF>. But sometimes some lines will be changed at Windows platform. Therefor it could happen that you have all different possibilities - as...
1,038
Posted By API
Change line end
Hello all,

what I would like to have sounds quite simple...

I have a file where the records have a line ending like (CR, LF, CR/LF, LFLF, ...) - so I do not know.

In result I would...
818
Posted By API
@rdrtx1: When I will do it in this way I will get...
@rdrtx1: When I will do it in this way I will get the same result as with my command:

Information Tool
:12:Delimiter
:3:Space
/92010329
:3:Space

By the way - there is no space...
818
Posted By API
Add string into certain lines - sed
Hello all,

I have surely an easy question - but at the moment I do not see the solution.

All what I want is to add the string "/9201" within a file when a line starts with ":47A:".

This is...
1,289
Posted By API
Hi drl, thanks for your explanations......
Hi drl,

thanks for your explanations... :)

Shell programming is only for small Problems, for further things I would also take Python... but sometimes it is more comfortable to do some...
1,289
Posted By API
Programming guidelines and style
Hello all,

I would like to know if there is a generally accepted unix shell programming Guideline?

Do you have any idea where to find this?

There are a lot of programming Guidelines...
4,625
Posted By API
Thanks a lot for your help... The best...
Thanks a lot for your help...

The best solution for me is the hint of ronaldxs:

IFS=$'\n'
for file in $(find . -name '*\ ' )
do
echo "($file)"
done

Thats fine for me.
...
4,625
Posted By API
@RavinderSingh13: I tried it, but it is same...
@RavinderSingh13: I tried it, but it is same output as described: (Test.dat)
4,625
Posted By API
Find files where filename ends with space
Hello all,

I would like to find files where the filename ends with a space - like Test.dat

I tried it with:

#!/bin/bash
for file in $(find . -name 'Test.dat*')
do
echo "($file)"
done...
15,644
Posted By API
@disedorgue: This does not work on my side. I...
@disedorgue: This does not work on my side. I will get the message, that no files have been found - but there are files in.

In the meantime I tried some things, and I found the solution:

...
15,644
Posted By API
Chmod with spaces and wildcards
Hello all,

I have a Problem within my Shell-script to do a 'chmod' at some files - where the Directory has spaces. Because I want to do this for many files I use the '*' Wildcard.

Here is my...
12,914
Posted By API
@RavinderSingh13: Yes - its working. ...
@RavinderSingh13: Yes - its working.

@rdrtx1: Yes. This works. I am surprised, that a for-loop is doing that.


Thanks for your help.
12,914
Posted By API
While read with different delimiter
Hello all,

I have the following script:

#!/bin/bash
i_string="TABLE|T_TS+AUSDRUCK|'hans.meier%'+SHIP|'Herr Kanns%'"
while IFS="+" read key_value_item
do
echo "key_value_item:...
1,645
Posted By API
@RavinderSingh13: That works very well. Beside of...
@RavinderSingh13: That works very well. Beside of the fact that I have to use "tar -r..." instead of "-u".

@jim McNamara: Works as expected...

Thanks to all. Thats what I needed. What I...
Showing results 1 to 25 of 50

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