10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
tr -cd '\11\12\15\40-\176' < file-with-binary-chars > clean-file
This removes special characters but how can I replace it with space (4 Replies)
Discussion started by: eskay
4 Replies
2. Shell Programming and Scripting
My first post, so don't kill me :)
Say i open some textfile with some example like this.
on the table are handy, bread and wine
Now i know exactly what is in and i want to separate and sorted it in terminal to an existing file with another 2 existing lines in like this:
table
plane ... (3 Replies)
Discussion started by: schwatter
3 Replies
3. Shell Programming and Scripting
hi Gurus,
I need separate a file which is one huge line to multiple lines based on certain number of charactors. for example:
abcdefghi high abaddffdd
I want to separate the line to multiple lines for every 4 charactors.
the result should be
abcd
efgh
i hi
gh a
badd
ffdd
Thanks in... (5 Replies)
Discussion started by: ken6503
5 Replies
4. Shell Programming and Scripting
Hi Experts,
How to sepearate the list digit with letters : with a space from where the letters begins, or other words from where the digits ended.
file
52087mo(enbatl)
52049mo(enbatl)
52085mo(enbatl)
25051mo(enbatl)
The output should be looks like:
52087 mo(enbatl)
52049... (10 Replies)
Discussion started by: rveri
10 Replies
5. Shell Programming and Scripting
Hello All,
I have a variable which is having values like this..
$var=A,B,C,D,E,F,G,H
I want to add space after every three alphabets so that my final variable should look like this..
$var=A,B,C, D,E,F, G,H
the space should come after the comma of third alphabet..
Pls tell me... (3 Replies)
Discussion started by: smarty86
3 Replies
6. Shell Programming and Scripting
Input:
Youcaneasilydothisbyhighlightingyourcode.
Putting space after three characters.
You can eas ily dot his byh igh lig hti ngy our cod e.
How can i do this using sed? (10 Replies)
Discussion started by: cola
10 Replies
7. Shell Programming and Scripting
Hi Everyone!
I want to build sql inserts from a list of countries/regions saved in a file. The list looks like this:
United Kingdom
Czech Republic
...
The script I run is:
while read i;
do
var=`expr $var + 1`;
echo "INSERT INTO calltypes VALUES($var, '$i','$i');" >>... (5 Replies)
Discussion started by: linuca
5 Replies
8. Shell Programming and Scripting
hello
I have this output
ifspeed 100000000
ifspeed 100000000
collisions 413
collisions 10
duplex full
duplex ... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies
9. UNIX for Dummies Questions & Answers
Hi everyone,
$ more abcdefg.ksh
abcdef
alpha beta gamma
abcdef
abcdef
lmnop
$ wc sachin1.ksh
5 7 132 abcdefg.ksh
if you see it shows that file has got 240 characters. I actually want to count how many characters... (1 Reply)
Discussion started by: sachin.gangadha
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I would like to display a sorted list (based on the login name) of the login name, the home directory and the default shell of each user defined on the system ;
I just do
cut -d: -f1,6,7 /etc/passwd | sort
And then I would like to separate each information with a space... (2 Replies)
Discussion started by: remid1985
2 Replies