10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file with multiple paragraphs/sections each starting with word "Handle" and if I grep for a pattern, I should get contents of entire section/para (not just line). Please advise, thanks!
#script.sh file.txt "System Information"
Handle 0x0001
DMI type 1, 27 bytes.
... (9 Replies)
Discussion started by: reddyr
9 Replies
2. Shell Programming and Scripting
Hi Folks,
I have a report data like the one seen below.
FRUITS@NEW_ORANGE(1500 04/29)
FRUITS@NEW_ORANGE(1500 05/04)
FRUITS@NEW_ORANGE(1500 05/05)
FRUITS@NEW_ORANGE(1500 05/07)
FRUITS@NEW_ORANGE(1500 05/12)
I need to use each of this lines separately in another for loop like the one... (2 Replies)
Discussion started by: jayadanabalan
2 Replies
3. Shell Programming and Scripting
Hi,
I need to replace an entire mailx line as follows using sed:
sed -e 's/<line1>/<newline>/g' <filename>
But I am getting comman garbled error since the new line has many special characters. I enclosed allspecial chars in \ but still no use.
Can any one help me?
Please use code... (2 Replies)
Discussion started by: vinodhin4
2 Replies
4. Shell Programming and Scripting
Hello,
I do have several files in one folder each file contains measurement data.
for each file I would like to replace the character "," by "." ?
How can I do this and how can I do this for each file at once?
E.G. data_1.dat, data_x.dat (original version)
data_1out.dat, data_x_out.dat... (10 Replies)
Discussion started by: rollinator
10 Replies
5. UNIX for Dummies Questions & Answers
Using the vanilla
ps -ef
I noticed that the CMD (or command) line gets cut off after 90 characters
UID PID PPID C STIME TTY TIME CMD
root 6020 3822 0 Jun 19 ? 0:01 ./webservd-wdog -r /export/opt/sows/61sp4 -d /export/opt/sows/61sp4/https-logse
Googling... (4 Replies)
Discussion started by: SixSigma1978
4 Replies
6. Shell Programming and Scripting
As per my understanding below mentioned line of code finding a word 'boy' in $ACULOG...
num_errors=`grep -i -e fail -e illegal -e exception -e "<E" -e boy $ACULOG | wc -l`
if I'm not corerct, please correct me. How I can find entire line like "This is a boy" with something similar as above... (1 Reply)
Discussion started by: heyitsmeok
1 Replies
7. UNIX for Advanced & Expert Users
Hi everyone
I am new to Unix. I got stuck up by small issue.
I have text file something like this
abc 'xyz' '5'
lmn 'pqr' '7'
i want to replace the abc 'xyz' '5' to abc 'xyz' '6'
but i have a key as 'xyz' based on this key i want to do that.
I am not aware of how to use sed... (7 Replies)
Discussion started by: Vijayaragavan
7 Replies
8. Shell Programming and Scripting
Friends,
I have .txt file with 3 millions of rows.
File1.txt
ABC1|A|ABCD1|XYZ1
ABC2|P|ABCD2|XYZ2
ABC3|A|ABCD3|XYZ3
ABC4|P|ABCD4|XYZ4
If second field has value P then print the entire line.
Thanks in advance for your help,
Prashant (4 Replies)
Discussion started by: ppat7046
4 Replies
9. Shell Programming and Scripting
Hey guys, I have a file that I've slowly been awking, seding, and greping for data entry. I am down to pull the addresses out to insert them into an excel file. Each address is a few lines, but i want to put a semicolon delimiter in between each address so I can export the text file into excel and... (6 Replies)
Discussion started by: Cocoabean
6 Replies
10. Shell Programming and Scripting
I have a perl function in my script that needs to replace an entire line in a file
sub changestate {
my $base = ();
my @base = ();
open(BASE, $file) || die("Could not open file!");
@base=<BASE>;
close (BASE);
foreach $base(@base)
{
if($base =~... (1 Reply)
Discussion started by: insania
1 Replies