10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when i try the snippet in the console its working fine:
ps awwwux | grep php-fpm | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
output:
but when i try the bash script:
#!/bin/sh
# -*- sh -*-
#... (3 Replies)
Discussion started by: danieloooo
3 Replies
2. Shell Programming and Scripting
I have a line like:
IDNO H1 H2 H3 HT Q1 Q2 Q3 Q4 Q5 M1 M2 EXAM
I would like to be able to access these tokens in such a way:
echo $myline #displays IDNO
Is this possible to do in a shell script? (3 Replies)
Discussion started by: afulldevnull
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am writing a little script to update a parameters on JMQ. however the JMQ requires a "y" confirmation to be input as part of the cmd I am running. However I want run this script to offline with no input from a user.
it works if a I create a file with with just y in it and pass that in... (3 Replies)
Discussion started by: shropshirehobbi
3 Replies
4. Windows & DOS: Issues & Discussions
Hi All,
This command works when I type it on but when I run the batch file it doesn't..any ideas why?
attrib.exe * | find /c /v "" >filecount.txt (1 Reply)
Discussion started by: Grueben
1 Replies
5. UNIX for Advanced & Expert Users
OK , ..
This is an odd one. I have a new server and I need to have a tunnel open to it.
I have this exact process running on a few others but this new one I just got is not allowing the script to connect.
I set up my users account and ssh keys
from the server that will host the tunneling i... (6 Replies)
Discussion started by: jeffsandman0035
6 Replies
6. Programming
Hi, I want to be able to write a simple program that takes in input from the command line. I;m am at the level of getchar and putchar. Any examples would be a great help thanks.
I intend/prefer also to use the pipe command | eg: input | file1
---------- Post updated at 04:08 PM ----------... (4 Replies)
Discussion started by: metros
4 Replies
7. Shell Programming and Scripting
Folks,
I have a 3 problems. In a sh script, I call a server name from a list and rex to a distant machine to get the boot date.
for i in `cat list`
do
(echo "$i|"; /bin/rexsh $i -l bozo -t10 who -b | cut -d" " -f14-16) >>getBootTimes.out
sleep 1
done
The results are on 2 lines instead... (8 Replies)
Discussion started by: linux_lou
8 Replies
8. Solaris
One of our T5220 console is not working & unable to login to ILOM , but system is up & running . is there a way to reset ILOM from command line ? (8 Replies)
Discussion started by: skamal4u
8 Replies
9. AIX
I have seen references in the forum about getting yesterday's date but it is either by changing something in the system (date, time zone, ...) or with more then one line of script cmds.
How can I get yesterday's date without changing anything in the system and in one single command line ? (4 Replies)
Discussion started by: Browser_ice
4 Replies
10. Shell Programming and Scripting
hi
I'm trying to query a directory, check it's the right directory, return the results into a text file, put text file into an array and navigate the subdirectories and delete contents.
find `pwd` -type d | grep TESTINGDIR > dirList.txt
The txt file is created from the cmd-line but not in... (4 Replies)
Discussion started by: OFFSIHR
4 Replies