I am new to shell programming. Can anyone help me out with anyone of these?
Display a count of the number of regular files, the number of symbolic links, the number of sub-directories, the number of block-special files, and the number of character-special files in the directory.
I don't... (4 Replies)
Hi there,
I'd like to find a way to display a string and count the words in it.
supernova:~# echo 'hello world' | tee - | wc
Unfortunately, this doesn't work.
Any idea?
Thanks in advance.
Santiago (15 Replies)
Hello,
I'm trying to do a select for an Oracle table but the output gives me only filelds values without fields name as in Informix.
Is there anyway to display both in output ?
For instance, the output will be :
Name Rico
Age 30
Position Engineer
Thx, (5 Replies)
Hi Mates,
I require help in the following:
I have the following file snmp.txt
Wed Mar 2 16:02:39 SGT 2011
Class : mmTrapBladeS
origin : 10.0.0.0
hostname : 10.0.0.2
msg : IBM Blade Alert:
Calendar Index : 10.0.0.2-IBMBLADE
Fri Mar 4 07:10:54 SGT 2011
Class : mmTrapBladeS... (2 Replies)
Hi folks,
I am facing one problem with v$sql, i need to store updating sql query in temp table when one trigger get fired on some update sql statement.
but with "sql_text" , i am not getting correct update statement in temp table.
I am getting sql_text with this cursor statement.
select... (0 Replies)
Gurus,
Thanks so much for your help, in advance.
I'm using ksh and outputting a literal string value to an output file, however, Unix isn't playing by SQL's rules. The ampersand character which I'm trying to disply as a knowledge base link is screwing up the output. Typically, the "&&" is... (1 Reply)
Hello everyone,
I am new to Unix and I am stuck with a problem. I need only a single command to display the output of who and then add the total number of users and display at the bottom of that output.
Example-: (Expected output)
sreyan@debian:~$ <command>
sreyan tty7 ... (7 Replies)
Hi Team,
below sql rerturn 20 records, the result set i am going to assign to one variable and it showing count is 1.
and i don't use count() in sql query... based on count, i need to fail the script.
No_of_step=`echo ${g_count} | wc -l`
function gf_count()
{
g_count=`sqlplus -s... (8 Replies)
Hi,
I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output
Here is how my file looks like
1.1.1.1
1.1.1.2
1.1.1.3
1.1.2.1
1.1.2.2
1.1.3.1
1.1.3.2
1.1.3.3
1.1.3.4
So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
LEARN ABOUT REDHAT
delete
DELETE(7) SQL Commands DELETE(7)NAME
DELETE - delete rows of a table
SYNOPSIS
DELETE FROM [ ONLY ] table [ WHERE condition ]
INPUTS
table The name (optionally schema-qualified) of an existing table.
condition
This is an SQL selection query which returns the rows which are to be deleted.
Refer to the SELECT statement for further description of the WHERE clause.
OUTPUTS
DELETE count
Message returned if items are successfully deleted. The count is the number of rows deleted.
If count is 0, no rows were deleted.
DESCRIPTION
DELETE removes rows which satisfy the WHERE clause from the specified table.
If the condition (WHERE clause) is absent, the effect is to delete all rows in the table. The result is a valid, but empty table.
Tip: TRUNCATE [truncate(7)] is a PostgreSQL extension which provides a faster mechanism to remove all rows from a table.
By default DELETE will delete tuples in the table specified and all its sub-tables. If you wish to only update the specific table men-
tioned, you should use the ONLY clause.
You must have write access to the table in order to modify it, as well as read access to any table whose values are read in the condition.
USAGE
Remove all films but musicals:
DELETE FROM films WHERE kind <> 'Musical';
SELECT * FROM films;
code | title | did | date_prod | kind | len
-------+---------------------------+-----+------------+---------+-------
UA501 | West Side Story | 105 | 1961-01-03 | Musical | 02:32
TC901 | The King and I | 109 | 1956-08-11 | Musical | 02:13
WD101 | Bed Knobs and Broomsticks | 111 | | Musical | 01:57
(3 rows)
Clear the table films:
DELETE FROM films;
SELECT * FROM films;
code | title | did | date_prod | kind | len
------+-------+-----+-----------+------+-----
(0 rows)
COMPATIBILITY
SQL92
SQL92 allows a positioned DELETE statement:
DELETE FROM table WHERE
CURRENT OF cursor
where cursor identifies an open cursor. Interactive cursors in PostgreSQL are read-only.
SQL - Language Statements 2002-11-22 DELETE(7)