10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I have a file that contains lines starting with a particular string plus a Colon: I need to output all these lines but only what comes after the colon
Can you pelase assist?
Example of lines in the file:
com.ubs.f35.cashequities/cashequities: 1 2
... (5 Replies)
Discussion started by: mnassiri
5 Replies
2. Shell Programming and Scripting
Hi,
I have some files being sent to me that have dates in them in this format:
from
1/8/2011 15:14:20
and I need the dates in this format (mysql date format)
To
2011-01-08 15:14:20
all I have so far is the regexp that detects the format:
sed -r -e 's@\1/\2/\3\4\5\6]::$@do... (7 Replies)
Discussion started by: Astrocloud
7 Replies
3. Shell Programming and Scripting
Hi,
I've few files in the following format
file 1
-------------------------
A=a1 B=0 C=1 D=3
A=a2 B=0 C=1 D=3
A=a3 B=0 C=6 D=7
A=a4 B=0 C=1 D=3
A=a5 B=0 C=1 D=3
file 2
-------------------------
A=a1 B=2 C=2 D=4
A=a2 ... (2 Replies)
Discussion started by: skpvalvekar
2 Replies
4. Shell Programming and Scripting
I am executing the following command:
sort file1.txt | uniq -c | sort -n > file2.txt
The problem is that in file 2, I get leading spaces, Like so:
1 N/A|A8MW11
8 N/A|ufwo1
9 N/A|a8mw11
10 900003|smoketest297688
10 N/A|a9dg4
10 danny|danni
12... (5 Replies)
Discussion started by: ddurden7
5 Replies
5. Shell Programming and Scripting
I am writing a shell script that checks all .c files to see if they use fprintf or printf. If a file does, then the line #include <stdio.h> is added to the top of the file, unless it's already there.
This is what I've got:
#!/bin/sh
egrep -l f?printf *.c | while read file;
do sed -i '1i\... (2 Replies)
Discussion started by: computethis
2 Replies
6. Shell Programming and Scripting
Hi All,
p1=90;
if
then
echo "<font color=red>"
else
echo "<font color=green>"
fi
how to i do it in awk or sed scripting ? (4 Replies)
Discussion started by: raghur77
4 Replies
7. Shell Programming and Scripting
hi all,
tnsping DBNAME > out.txt
cat out.txt
TNS Ping Utility for Linux: Version 10.2.0.2.0 - Production on 23-JUL-2009 05:49:52
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/fisc/oracle/product/10.2.0/network/admin/sqlnet.ora
Used TNSNAMES adapter to... (2 Replies)
Discussion started by: raghur77
2 Replies
8. Shell Programming and Scripting
Hello All,
Does anybody know how to extract the entries from the 1st and second column that match a multiple regex expression using either sed or awk?
I have a 40 k file with the data that looks like this.
2 VZudbEE.ds_HP11i-726..>
2 VZudbEEE.ds_IB-726-5..>
2... (1 Reply)
Discussion started by: liketheshell
1 Replies
9. Shell Programming and Scripting
Hi,
I'm new to Awk/Sed programming.
I have a status file like this:
TYPE | FILE1 | Now Started
TYPE | FILE2 | Just Finished
TYPE | FILE3 | Now Started
TYPE | FILE4 | Just Finished
For a given FILE no, I need to change the "Now Started" condition to "Just Finished" in this file. The... (5 Replies)
Discussion started by: autouser123
5 Replies
10. Shell Programming and Scripting
hey all,
i was just wondering if it was possible to to get data from user input , and parse it through sed to remove or add what that user has entered into a flat file?
do i need awk ?
any help is greatly appreciated
~shan2on (2 Replies)
Discussion started by: shan2on
2 Replies