10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
I am with this one column input text file to change layout, please help. Thanks. I have awk, sed.
$ cat input
Median
1.0
2.3
3.0
Median
35.0
26.3
45.7
10.1
63.1
Median
1.2
2.3 (8 Replies)
Discussion started by: cwzkevin
8 Replies
2. UNIX for Dummies Questions & Answers
Hello, I have a situation where I want to change a line of text in multiple files, but the problem is that I want to change the text to something unique for each file.
For example, let's say I have five files named bob.txt, joe.txt, john.txt, tom.txt, and zach.txt. Each of these files has a... (5 Replies)
Discussion started by: Scatterbrain26
5 Replies
3. UNIX for Dummies Questions & Answers
I'm changing some html code on multiple web pages and I need to match particular phrases but keep some text within each phrase.
E.G. I need to change this line:
<DIV id="heading">Description:</DIV>
into
<span class="hlred">Description:</span><br />
The text "Description:" may... (2 Replies)
Discussion started by: hal8000
2 Replies
4. Shell Programming and Scripting
I have a file as below and want to change it using awk
I want to find the entries such as
Iteration No.788
Best Value 0.00408152
Next-Worst Value 0.00522935
Worst Value 0.00523487
and change it to
Iteration No.788
788. Best Value = 0.00408152
788. ... (8 Replies)
Discussion started by: kristinu
8 Replies
5. Programming
I'm writing my own Unix ls command in c and I was wondering if anyone knows how to or can point me to a tutorial that shows me how to change the text color of the filename depending on if it's a directory, regular file, linked file, etc..., like the real ls command does? Thanks. (4 Replies)
Discussion started by: snag49ers
4 Replies
6. Shell Programming and Scripting
Hi,
I have a shell script to unload all the empname who have salary >50000 from the emp table into a text file(empname.txt) .
m_db unload "$dbc_file" -column_delimiter ',' -select "SELECT empname FROM emp where salary > 50000" >> empname.txt
Now my text file have data in the following format ... (3 Replies)
Discussion started by: kavithakuttyk
3 Replies
7. Shell Programming and Scripting
Hi,
I want to change my command prompt to contain the current username and the current directory in it, instead of just the '$' symbol.
I tried the command:-
export PS1="$(echo \\n$) "
But whenever I switch the user or change the directory, the changes are not reflected in the command... (10 Replies)
Discussion started by: unipepper
10 Replies
8. UNIX for Advanced & Expert Users
Hi,
I want to change the color of the text. Currently, I am using the following VT100 command, which changes the color of the foreground:
<ESC>[{attr1};...;{attrn}m
The problem is, when I change the color of the foreground, it changes the color of the text as expected, but it also... (4 Replies)
Discussion started by: Abed Alnaif
4 Replies
9. Shell Programming and Scripting
I have a text file with a bunch of ethernet port names and host names. I need to just change the last 2 chars on each line to a new number how can I do this quickly?
from
ethernet5/35 Net01
ethernet5/36 Net01
ethernet5/37 Net01
ethernet5/38 Net01
to
ethernet5/35 Net02
ethernet5/36... (4 Replies)
Discussion started by: kingdbag
4 Replies
10. UNIX for Dummies Questions & Answers
Hi everyone,
Having trouble with sed. I searched the board and found some stuff, but still unclear.
I have a file named "userfile" which stores the users info in this form: email:username:password:
I want the user to be able to change their password.
i tried with sed s/oldpass/newpass/g... (2 Replies)
Discussion started by: primal
2 Replies