10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I am trying to perform the below operation -count=`cat abc.txt | wc -l`
echo$count
5
Head=Start"$DATE"00000"$count"File
echo $HEAD
START15020300000 5File
There is a space coming before 5 which is not needed . How to ignore that . (4 Replies)
Discussion started by: honey26
4 Replies
2. Shell Programming and Scripting
Hi All,
Im trying to find the count of process running on remote server using SSH.
Below command dosen't work.
ssh -q user@host "ps -ef | grep "pattern" | grep -v 'grep' | awk '{print $2}'|wc -l"
But below command works.
ssh -q user@host "ps -ef | grep "pattern" | grep -v... (1 Reply)
Discussion started by: Girish19
1 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have a file which contains some special char or space.
when using cat -evt I can see the file as following:
0,"0000","abc/def aaa ... (6 Replies)
Discussion started by: ken6503
6 Replies
4. Shell Programming and Scripting
Hi,
Since today, with csh or tcsh, if I do 'ls files* > list',
every lines end with an extra space!
What happenned?
What can I do to go back when there was no extra space?
If I change to bash, there's no extra space.
Thanks,
Patrick
---------- Post updated at 03:19 PM... (1 Reply)
Discussion started by: trogne
1 Replies
5. Shell Programming and Scripting
I have used m4 in the past to generate source code where aesthetics and space were of no consequence . Now I am using it to generate script and program templates .
So here is an excerpt from my m4 file for producing a generic bash script:
dnl `$Id$'
define(`START_SCRIPT',`#!/bin/bash... (8 Replies)
Discussion started by: Bubnoff
8 Replies
6. Shell Programming and Scripting
for diskname in $(lspv |awk '{print $1}')
do
lquerypv -h /dev/|awk '/'$diskname'/ { print ; exit }'
done
No output is returning from the loop.
I think awk put an extra space to the command - lquerypv -h /dev/
so that the command is executed as i.e. lquerypv -h /dev/ hdisk230 with a space... (7 Replies)
Discussion started by: Daniel Gate
7 Replies
7. Programming
Is there anyway to spool my select statement into spool files of max 10000 records each?
eg I have a select statement that will return 45000 records.
A normal spool command will output the 45000 into just one spool file.
How can I make sqlplus do this?
00001 - 10000 records --- spool... (3 Replies)
Discussion started by: Leion
3 Replies
8. Shell Programming and Scripting
Hi all,
I would want to spool file for a database query, however by using crontab, the file is not spooled. Below shows my script:
ORACLE_HOME="/u01/oraprod/perpdb/10.1.0/db_1"
OUTFILE="/tmp/invalid.out"
FILE="$HOME/admin/scripts"
$ORACLE_HOME/bin/sqlplus -s "/as sysdba"... (0 Replies)
Discussion started by: *Jess*
0 Replies
9. Shell Programming and Scripting
Hello,
I have a sh script excuting a sql query through sqlplus. I am having trouble making my date equal to the date of the server time in the sql script. How can i call the server date from my query?
Thanks (2 Replies)
Discussion started by: kingluke
2 Replies
10. UNIX for Dummies Questions & Answers
hi,
I'm in Solaris 2.8 env. When i'm trying to add a ftp user account ,
encountered "no space in disk" .. couldn't create any user. Then check the fs disk space with "df - k " and /var/adm/syslog .. got the below message.
Jun 9 03:10:53 mail sendmail: NOQUEUE: low on space
(have 0,... (10 Replies)
Discussion started by: Dolly
10 Replies