10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Have a file which has the create statement like below
create table emp
( empno integer,
empname char(50))
primary index(empno);
i need to find a string starting with create and ends with semi-colon ;. if so insert the below statement before create statement
rename table emp to emp_rename;... (2 Replies)
Discussion started by: Mohan0509
2 Replies
2. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
3. Shell Programming and Scripting
Hi,
I am trying to check for missing dates in a file and would want to insert the missing date into the file.
Currently the script is as below
#!/bin/ksh
dates="dates"
cat ${dates} | grep -v "^#"
curr_month=`date '+%m`
curr_day=`date '+%d`
curr_year=`date '+%Y`
#curr_month=02... (7 Replies)
Discussion started by: newbie_01
7 Replies
4. Shell Programming and Scripting
I want to search for a block of text in httpd.conf that between two strings and comment it. There are multiple blocks with "<Directory.. and </Directory>"
<Directory "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/htdocs">
#
# Possible values for the Options directive are... (3 Replies)
Discussion started by: kchinnam
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines of data within a log file on a Redhat 5 Linux system.
eg I need all the lines with a particular username over the last 3 minutes.
the log file may read like this, and I want a way to search all the lines extracting all the relevant lines over the last 3... (2 Replies)
Discussion started by: mantis100
2 Replies
6. Shell Programming and Scripting
Hi,
I have a single value in insertval file. I want to load that value to database with the current date. I tried the below code but it is inserting <NULL> to database and echo $c is also null.
cat insertval | awk -F ' ' '{print $1}' > c
echo c=$c
data=`sqlplus -s user/pwd@hostname <<EOF ... (5 Replies)
Discussion started by: Neethu
5 Replies
7. Shell Programming and Scripting
Input:
fstab is a configuration
file that contains information
of all the partitions
and storage devices
in your computer.
The file is located under /etc,
so the full path
to this file is /etc/fstab.
The >>>>> characters would be replaced by some texts.
For example if i run a... (5 Replies)
Discussion started by: cola
5 Replies
8. Shell Programming and Scripting
Hi All,
Can someone pls help me to insert some text on a file.
my file contains something like below..
AKBULBU,
BALUMIL,
BATCH,BATCH
BOARROB,
BOTAKAT,
C57896,
CAKIOZE,
CHECMER,
CICOFRA,
CISZPAW,2194485
I want output as
USER_ID, LOGIN_ID (6 Replies)
Discussion started by: harshakusam
6 Replies
9. Shell Programming and Scripting
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies
10. Shell Programming and Scripting
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies