10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dears,
In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of let me know any other easier option.
sed -n '/dn: MSISDN=/,/^\s*$/p' full.ldif > temp ; sed -n... (4 Replies)
Discussion started by: Kamesh G
4 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix.
In this forum some days back, I have read something like below:
1) Do not use perl if awk can do your work.
2) Do not use awk if sed can do your work.
.
.
.
I do not re-collect the whole thing. I think it is good to know the precedence of using these... (2 Replies)
Discussion started by: Prathmesh
2 Replies
3. Shell Programming and Scripting
how can i make find/sed to include directory names with spaces
the command is like this
for i in `find wp-content/themes -type f -print0 | xargs -0 grep -l
-iE 'e'`;do sed -i -e 's/word1/word2/gI' "$i";done
but it skips one directory names with spaces
sed: can't read ./Nova: No such... (5 Replies)
Discussion started by: vanessafan99
5 Replies
4. Shell Programming and Scripting
i have something like this in a file
cat onlytables.sql
create table NextID (
id int auto_increment,
zoneID int,
entityName varchar(64),
nextID int,
lastModified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
primary... (6 Replies)
Discussion started by: vivek d r
6 Replies
5. Shell Programming and Scripting
I want to make the first character of some words to be uppercase. I have a file like the one below.
uid,givenname,sn,cn,mail,telephonenumber
mattj,matt,johnson,matt johnson,mattj@gmail.com
markv,mark,vennet,matt s vennet,markv@gmail.com
mikea,mike,austi,mike austin,mike@gmail.com
I want... (3 Replies)
Discussion started by: matt12
3 Replies
6. Shell Programming and Scripting
Hi All,
After reading that the sort command in Linux can be made to use many processor cores just by using a simple script which I found on the internet, I was wondering if I can use similar techniques for programs like the awk and sed?
#!/bin/bash
# Usage: psort filename <chunksize>... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
7. Shell Programming and Scripting
hello, I'm trying to write the fastest sed command possible (large files will be processed) to replace RICH with NICK in a file which looks like this (below) if the occurance of RICH is uppercase, replace with uppercase if it's lowercase, replace with lowercase
SOMTHING_RICH_SOMTHING <- replace... (10 Replies)
Discussion started by: rich@ardz
10 Replies
8. Shell Programming and Scripting
Hello!
Please bare with me, I'm a total newbie to scripting. Here's the sudo code of what I'm trying to do:
Get file name
Does file exist?
If true
get length of file name
get network id (this will be the last 3 numbers of the file name)
loop x 2
If... (1 Reply)
Discussion started by: KatieV
1 Replies
9. Shell Programming and Scripting
Input:
You can easily do this by highlighting your code.
How can i get the substring from index 9 to 12 using sed? (6 Replies)
Discussion started by: cola
6 Replies
10. Shell Programming and Scripting
sed 's/abc/xyz/g' abc.txt > abc.txt
This change all the abc s in abc.txt to xyz s but does not write back to the abc.txt.
Suggest me the cleaner way without using temp file please.
Cheers,
Amol. (3 Replies)
Discussion started by: amol
3 Replies