10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to run sql query in shell script and output data save as delimited text (delimited text would be comma)
Code:
SPOOL_FILE=/pgedw/dan.txt
SQL=/pgedw/dan.sql
sqlplus -s username/password@myhost:port/servicename <<EOF
set head on
set COLSEP ,
set linesize 32767
SET TRIMSPOOL ON
SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies
2. Shell Programming and Scripting
Hello ,
I am trying to run a NetBackup command in remote server. Also this command can only be run by root so I am using sudo . Also I want the output of the command locally in a file.
The below command asked for password , ran successfully and showed Output on my local server screen
... (2 Replies)
Discussion started by: rahul2662
2 Replies
3. Shell Programming and Scripting
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Core Utilization
CoreId %Usr %Sys %Total
------ ----- ----- ------
5 4.91 0.01 4.92
6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
4. Shell Programming and Scripting
Using ksh on AIX what I am trying to do is to read the ls -l output from a file in a do while loop line by line. Extract the user name(3rd field) and the directory/file name(9th field) using awk and save them into variables. su -c to the user and change directory/file permisions to 777. Script I... (13 Replies)
Discussion started by: zubairom
13 Replies
5. Shell Programming and Scripting
Hi,
in shell script, i have the command swstart -p which returns an output. i want to store the output of this command into a variable. how i can do that
excerpt from the script
#!/usr/bin/ksh
#
#
#
# Program: swstart -p
#
# Description: Starts the sentinels on Slave server
... (4 Replies)
Discussion started by: lookinginfo
4 Replies
6. Shell Programming and Scripting
hi there !
i have exactly the same problem like this guy here
https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html
i am not able to save the curl verbose output..
the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies
7. UNIX for Dummies Questions & Answers
hi, everyone:
I just wonder how to save the output of command, I mean everything, save as a string into a variable.
another question is I try to ls the details of a directory, but it works in the shell, not in the script.
for example
code: ls -ltr *se100* | grep ^- | tail -1 | awk '... (1 Reply)
Discussion started by: allenxiao7
1 Replies
8. Shell Programming and Scripting
Hi all,
is it possible to save the output of a unix command executed in perl to be saved in hash variable..
like i have the command
`find $mypath ! -user mainuser -printf \"\%u \%h\\n\"`;
this will print all the users other than mainuser with their paths.
so is possible to capture... (2 Replies)
Discussion started by: saapa
2 Replies
9. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
10. Shell Programming and Scripting
Hi
Say I am running a script using my user id csaha. How can I run any specific command in the same sctipr using any other user id (say root). Definitely I have the password of root. Any idea how the same can be achieved ???
Example:
I need to run a script using my id (csaha) only on... (4 Replies)
Discussion started by: csaha
4 Replies