10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position?
I am asking this because the file I have doesn't always follow a pattern.
For example the file I have is the result of a command to obtain windows ACLs:
icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 Replies
2. UNIX for Dummies Questions & Answers
Hi again
I have an xml file and want to remove the leading white space as it causes me issues later in my script
I see sed is possible but cant seem to get it to work
I tried
sed 's/^ *//' file.xml
output
<xn:VsDataContainer id="1U104799" modifier="update">
... (10 Replies)
Discussion started by: aniquebmx
10 Replies
3. Shell Programming and Scripting
I have a file that looks like this:
102| #2 X 1/4-INCH| 30188| EA| FTW| A| NOT SERIAL TRACKING| NOT LOT TRACKING| TRUE| #2 X 1/4-INCH
102| #2 X 1/4-INCH| 30188| EA| VPS| A| NOT SERIAL TRACKING| NOT LOT TRACKING| TRUE| #2 X 1/4-INCH
102| #6 X 1/2"| ... (2 Replies)
Discussion started by: djehresmann
2 Replies
4. Shell Programming and Scripting
I have a 13 number string, some whitespace, and then /mp3.
I need to join them. Everyline that I need this for begins with "cd" (without the quotes).
What it looks like now:
cd media/Audio/WAVE/9781933976334 /mp3 What I want my output to be:
cd media/Audio/WAVE/9781933976334/mp3 The 13... (7 Replies)
Discussion started by: glev2005
7 Replies
5. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
6. UNIX for Dummies Questions & Answers
Greetings
I need to replace "whitespace" in a file with the newline character aka carriage return
My command is either wrong or not interpreted properly by me shell
sed s/" "/\\n" "/g nets > nets1
or
sed s/" "/\n" "/g nets > nets1
nets (input file)
13MHZ_IN... (4 Replies)
Discussion started by: awk_sed_hello
4 Replies
7. UNIX for Dummies Questions & Answers
I combined 2 files using the paste command. It gave me something like this:
123445 ,AABBNN
22344 ,BBVVMM
I want to remove the whitespace between the end of string 1 and the comma (there is more blank space than my post is showing). Would I... (2 Replies)
Discussion started by: nickg
2 Replies
8. UNIX for Advanced & Expert Users
I have teh follwing details in a file:
SmithA..... ,,400
JonesA..... ,,300
JamesA..... ,,600
BakerA ,,800
ChrisA ,,1200
the first field name is 6 characters in length always and alays ends with an 'A'.
The periods denote white space (space caharacters), as you can see on certain... (1 Reply)
Discussion started by: SAMZ
1 Replies
9. Shell Programming and Scripting
I am trying to search through a text file and replace the number 1 at the beginning of the string in the second field with the number 9. There maybe one or more occurrences of whitespace between the string GPA131 and 17049333610. Does anyone know how to do this with sed?
GPA131 17049333610
... (1 Reply)
Discussion started by: cstovall
1 Replies
10. Shell Programming and Scripting
Hi,
I know removing whitespaces I can found so many threads to read how it works and i did it, but my problem isn't solved...
I have in my script a variable $1 which can contains a text like " Channel ".
No I want to check if $1 contains the word Channel, but I don't know how many... (4 Replies)
Discussion started by: bensky
4 Replies