Approach to writting a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Approach to writting a script
# 15  
Old 05-20-2009
Long time since I visited this thread.

I found this link which describes what I wish to do, BUT
http://www.cyberciti.biz/tips/ssh-pu...on-how-to.html
as this machine has a low priviledge login, I can't do what I want to do.

I need some way to login as the low priviledge account, then
PHP Code:
su sroot 
the command I wish to are like these...
PHP Code:
ifconfig grep ^eth0 awk '{print $5}'

echo "Serial: "dmidecode grep -"serial number";
cat /proc/cpuinfo egrep -'(model name|cache)';
echo 
" ";    
cat /proc/cpuinfo egrep -'(cache)';
echo 
" ";
echo 
" ";
echo 
"RAM: "cat /proc/meminfo grep MemTotal awk '{ print $2}';
fdisk -grep -i disk;    echo " ";    cat /proc/scsi/scsi grep -i perc
# 16  
Old 05-27-2009
Perhaps I should temporarily create a root like account?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What is the right approach to take?

Hello every one, I will love to know what is the best approach to take in obtaining books online. I find it disturbing just googling a book online and downloading it without actually paying for it. I strongly believe that this is wrong and that i may not be able to unlock the key contents and... (2 Replies)
Discussion started by: despiragado
2 Replies

2. Shell Programming and Scripting

Help with approach and developing script

Hi- I need to develop a script for following scenario in AIX and K shell environment.I am from windows server background for most my career ,so please bear with me and advise suitable approach and technical assistance.Having said that I am aware of unix shell commands but never pput together at... (1 Reply)
Discussion started by: nirasm
1 Replies

3. Red Hat

What would be the best approach?

I have a table in one of my DB. The DB is about 300 gig - of that 249 gig is in this table. The data is somewhat important but even if we delete half of it won't affect anybody. I would like to reclaim some space back so my question is what would be the best approach to accomplish this task.... (6 Replies)
Discussion started by: newborndba
6 Replies

4. Programming

Oracle Procedure approach

HI All , I am new to oracle procedures. Please help me for the approach to satify the requirement. I need to create procedures. with parameters passed ( say report,type,identities,country ) It should also call sql query within the procedures and passed parameters should be used in where clause... (2 Replies)
Discussion started by: Perlbaby
2 Replies

5. Shell Programming and Scripting

Need advice on approach for script

Greetings all. I have a repository server which receives, without exhaggeration, several million files a week. The majority of these files are in .csv format, which means they're highly compressable. They are spread throughout numerous directories where there are configured monitoring utilities... (4 Replies)
Discussion started by: msarro
4 Replies

6. SuSE

Write shell script using menu-driven approach to show various system

QUESTION: Write shell script using menu-driven approach to show various system configuration like 1) Currently logged user and his logname 2) Your current shell 3) Your home directory 4) Your current path setting 5) Your current working directory 6) Show Currently logged number of... (1 Reply)
Discussion started by: bboyjervis
1 Replies

7. Shell Programming and Scripting

writting a shell script to delete damage files

hi, I have 100 files say File1.mp3, File2.mp3 .......file100.mp3 i found that File1.mp3 to File50.mp3 are damaged. I want to delete the damaged files from the directory using sed with regex how can i do this. thanks (5 Replies)
Discussion started by: pchangba
5 Replies

8. Shell Programming and Scripting

Scp without writting

Hi, i have a file (filename xyz.file) and i scp it daily to server B. B runs a job daily and remove it. A sends it at 9am, B removes it at 915am. Now i have another server C, it also scp a file (xyz.file) to B. C will send to B at 930am and B will remove it at 10am. My worry is if B fails to... (7 Replies)
Discussion started by: new2ss
7 Replies

9. Shell Programming and Scripting

Writting to multiple file

Hi!, My script generates a lot of files while running.. The same output at any point may be diercted to some of them.. if I have 4 files file1 file2 file3 file4, echo "output" to file1 file2 file3 file4 Any ideas on how to do it?? (2 Replies)
Discussion started by: jyotipg
2 Replies
Login or Register to Ask a Question