10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello folks!
I have a file containing lines like this
Something text 18:37Remove This: 1,111"Keep this text"
Some more text 19:37Remove This: 222"Keep this text"
More text 20:50Remove This: 3,333Keep this text
And more text 25:50Remove This: 44,444Keep this text
I would like to... (4 Replies)
Discussion started by: martinsmith
4 Replies
2. Shell Programming and Scripting
Hi
I have assigned an output of a command to $I. I try to print the input and put a new line after occurrence of the hostname which is assigned to $HOST1 ( Example: pwrm16 ) . First of all I need to get rid of the Colon after the host name pwrm16: and make it pwrm16 then I want to print the... (10 Replies)
Discussion started by: mnassiri
10 Replies
3. Shell Programming and Scripting
Hi all,
I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like
. ; : ! ?I found the following command
sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies
4. What is on Your Mind?
Well you lot seriously amaze me.
There was a thread a few hours ago, (on the date stamp shown in this upload), that generated loads of solutions to a fairly simple problem:-
https://www.unix.com/shell-programming-scripting/235829-how-print-particular-character-n-number-times-line.html
As a... (0 Replies)
Discussion started by: wisecracker
0 Replies
5. Shell Programming and Scripting
can someone please show me a better way (if there is one), to grep out all variations (upper and small case letters) from a file?
egrep "(panic|error|failed|fail|FAIL)" /var/log/messages
I'm interested in finding any string that may indicate somethings wrong with ANY part of a system. so, if... (6 Replies)
Discussion started by: SkySmart
6 Replies
6. Shell Programming and Scripting
Hi there,
I have a bunch of files that I want to modify.
As a beginner, but nevertheless enthusiast, in the use of the shell I want to create a script enabling me to modify those files quickly.
I had only some partial success with various peaces of scripts but I would like to create one script... (1 Reply)
Discussion started by: iamzesh
1 Replies
7. Shell Programming and Scripting
Hi guys,
I have a file separated by ",". I´m trying to change to upper case the first letter of each word in column 2 to establish a standard format on this column.
I hope somebody could help me to complete the SED or AWK script below.
The file looks like this:
(Some lines in column 2... (16 Replies)
Discussion started by: cgkmal
16 Replies
8. Shell Programming and Scripting
Hi,
Is there any function(Bash) out there that can convert the first character of each word to upper case?... (3 Replies)
Discussion started by: harchew
3 Replies
9. UNIX for Dummies Questions & Answers
How would I print the word "and" between the words "FOO" and BAR" using sed? My file has three words in it FOO and BAR. I only want the word "and".
Thanks every one. (7 Replies)
Discussion started by: tigta09
7 Replies
10. Shell Programming and Scripting
I want to print the 1st field in a comma seperated file to lower case and the rest the case they are.
I tried this
nawk -F"," '{print tolower($0)}' OFS="," file
this converts whole line in to lower case i just want the first column to be converted.
The below doesnt work because in... (11 Replies)
Discussion started by: pinnacle
11 Replies