10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello good day
I would like to know what is the difference between these two commands please
both warrant the output in the file
echo " ORACLE_SID : $ORACLE_SID" | tee -a $logfile
echo " ORACLE_SID : $ORACLE_SID" > $logfile (3 Replies)
Discussion started by: tricampeon81
2. Shell Programming and Scripting
I have a csv file that I would like to remove duplicate lines based on 1st field and sort them by the 1st field. If there are more than 1 line which is same on the 1st field, I want to keep the first line of them and remove the rest. I think I have to use uniq or something, but I still... (8 Replies)
Discussion started by: refrain
3. Shell Programming and Scripting
I have a text file which has blank lines. I want them to be removed before upload it to DB using SQL *Loader. Below is the command line, i use to remove blank lines.
sed '/^ *$/d' /loc/test.txt
If i use the below command to replace the file after removing the blank lines, it replace the... (6 Replies)
Discussion started by: vel4ever
4. Shell Programming and Scripting
I have a log file (updates.log), and I want to hunt the file for any errors. Here's an example of the log file:
SQL> update <table1> set <value1> = '*****';
update <table1> set <value1> = '*****'
ERROR at line 1:
ORA-00942: table or view does not exist
Elapsed:... (4 Replies)
Discussion started by: dbchud
5. UNIX for Dummies Questions & Answers
how can I cut out partiluar lines like from line 233 to 347 ?
any idea? (2 Replies)
Discussion started by: kvok
6. Shell Programming and Scripting
I have a data file e.g. DATA31082009. This file consists of several data files appended to that file. The size of each data file is different. The first line of each file starts with "44". I want to grep data from "44" to the preceding line of next "44" and save it as a individual file.... (10 Replies)
Discussion started by: chssastry
7. Shell Programming and Scripting
I have a file a.txt, inside is
Mon Jul 20 00:05:07 2009 12
Mon Jul 20 00:05:08 2009 1
The output should be a.txt, inside is
My method is
`cat a.txt | cut -f4,6 -d' ' > a.txt.tmp;mv -rf a.txt.tmp a.txt`;
Is any good way to do this? like perl... (5 Replies)
Discussion started by: jimmy_y
8. Shell Programming and Scripting
i have been doing this script to match every line in a current log file (access_log) with strings that i list from a path (consist of 100 of user's name ex: meggae )..
and then make a directory of every string from the text file (/path/meggae/) --->if it matched..
then print every line from the... (3 Replies)
Discussion started by: meggae
9. Shell Programming and Scripting
All, I have a file that I want to read, cut 12 lines and direct into a new file, and continue to do this until I reach the EOF. How do I do it?
can I use cat or read to do this?
the file is formated with repetitive output consisting of these 12 lines
dev_id: <device ID>... (7 Replies)
Discussion started by: turk22
10. Shell Programming and Scripting
I have a text file contaning around 150 lines, each line is a hostname.
I want to read 4 lines/hostnames and save those 4 lines to a seperate file.
say the big file is /files/bigfile and I want to have a lot of files in /files named
/files/smallfile.1 , /files/smallfile.2 and so on...
... (1 Reply)
Discussion started by: networkfre@k