10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have about 350 programs in which I have to add 2 lines; one before and one after a specfic line.
The following script does the job except that I lose the indentation.
while read line ... (8 Replies)
Discussion started by: jgt
2. Shell Programming and Scripting
how can i add spacein file name with sed if strings have no space around dash
( 18-19 )
output after add white space
19 - 20
(18 - 19 )
ABC - EFG
thx in advance (2 Replies)
Discussion started by: mhs
3. Shell Programming and Scripting
I have an AWK script that uses multiple delimiters in the FS variable.
My awk script takes a file name such as this:
12345_smith_bubba_12345_20120215_4_0.pdf and parses it out based on the under score. Each parsed field then has some code for data validation etc.
This script has... (12 Replies)
Discussion started by: reno4me
4. Shell Programming and Scripting
In following code
find LOG_DIR -type f | while read filename; do echo $filename; done
I want to precede each white space encountered in filename with \ so that when i use $filename for running some commands in do...done,it wont give me an error.
will appreciate ur help in this.... (1 Reply)
Discussion started by: ajaypadvi
5. Shell Programming and Scripting
What sed command (if sed is the right command) can remove ALL white space from my file. I have a csv, except I want to remove all white space between commas and characters.
My idea (without testing)
sed 's/ //g'
Is there a better way? (18 Replies)
Discussion started by: mcclunyboy
6. Shell Programming and Scripting
I am trying to match white space in patterns through - Grep
I tried ] & ] but none of them worked.
Then I tried Perl extension '\s' and it worked.
So just wanted to know if ] & ] are still supported or have they become deprecated.
However they have been mentioned in the... (3 Replies)
Discussion started by: paragkalra
7. UNIX for Dummies Questions & Answers
Suppose i have a variable test which stores a string as below:
now i want to use sed on the above variable and replace + with a white space, so that i get
echo $test should give me
'john drives a car'
Between... (1 Reply)
Discussion started by: sandeep_1105
8. Shell Programming and Scripting
I know there's a really simple answer to this but I just can't think of it :)
I'm processing a file which has lines containing white space i.e.
And I want to perform some awk on each line but when I do the following:
for US in $( cat /tmp/unique-strings.tmp | sed 's/\/\\]/g'... (6 Replies)
Discussion started by: pondlife
9. Shell Programming and Scripting
Having a problem with a file..
the file contains the following data... (a snapshot)
It has 3 columns sepreated by a ,
the second column... (7 Replies)
Discussion started by: Zak
10. Shell Programming and Scripting
I am using Posix shell to write a script. The problem I am having is that when I use the read command to go through a file I lose the tabs. How can I keep this from happening? (1 Reply)
Discussion started by: keelba