9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello
this script should show all users and space they used without problem :
ls /home >> /root/users.txt
cat /root/users.txt | while read line; do
space=`du -s /home/$line`
echo "$line space is $space"
shift
done
but when i remove pipe ,script run without any output:
ls /home... (4 Replies)
Discussion started by: nimafire
4 Replies
2. UNIX for Dummies Questions & Answers
Hi Experts,
I am in need for some help. My competence level on unix is not at all helping me to resolve this. Please help.
My Input for a system command is as under:
Counters are getting pegged each hour. I need to have a difference printed rather than pegged counter values.
Counter... (2 Replies)
Discussion started by: vanand420
2 Replies
3. Shell Programming and Scripting
if ;then
echo "mrnet greater 5000"
gzip /var/log/mrnet.log
mv /var/log/mrnet.log.gz /var/log/mrnet.log.1.gz
if ];then
i=1
let i++
mv /var/log/mrnet.log.1.gz /var/log/vieux-logs/mrnet.log.$i.gz
else
echo "theres no... (1 Reply)
Discussion started by: Froob
1 Replies
4. Shell Programming and Scripting
i having a file
xxxxxxxxxxxxxxx1234 ...........value can be change
xxxxxxxxxxxxxxx1235
xxxxxxxxxxxxxxxx1236
.
.
.
.
xxxxxxxxxxxxxxxxx1300 ...........value can be change
i want to cut last four characters of first line and last line and find the missing pattern.
output should... (4 Replies)
Discussion started by: sagar_1986
4 Replies
5. Shell Programming and Scripting
Hi,
I am new to shell script. I want to count to Delimiter count for my source file. For that I have written script. When I tried to execute the script I could not able to view the results. It throws errors. I don't know what the problem is. My aim is I want to store the delimiter count in one... (4 Replies)
Discussion started by: suresh01_apk
4 Replies
6. Shell Programming and Scripting
Hi,
I have such an example(ksh):
name1=Example
directory=/directory1/Example/directory2
match=$(grep -s '$name1' $directory | wc -l)
echo $match
But it replies to me:
0
What I expect from it, is to find $name1 in $directory and produce 1 for me as true, not false. (3 Replies)
Discussion started by: chish
3 Replies
7. Shell Programming and Scripting
Hi,
I need some help.
Shell script counter. i need to add condition to check if counter is more than 10 and longer than 3 hours? it runs every 5 mins. it only check count and send email right now.
it runs in cron as below
gregcount.ksh gregdb 10 > /tmp/gregcount.out 2> /tmp/gregcount.err
... (1 Reply)
Discussion started by: pega
1 Replies
8. Shell Programming and Scripting
Hi,
I'm attempting to take the following input list and create an output file as shown below. I've monkeyed around for long enough. Can anyone help?
NOTE: fs*** will be header and I want to get a count on NY**.
fs200a
NY7A
fs200b
NY7B
NY7B
NY7B
fs200c
NY7C
NY7C
NY7C
NY7C... (2 Replies)
Discussion started by: jwholey
2 Replies
9. Shell Programming and Scripting
I have the following
for(( i=1; 1<=2; i++))
do
e1=123 n1=123
e2=456 n2=456
coord= $e1,$n1
echo "coordinate=$coord"
done
exit
this echos
coordinate=123,123
I need it to loop so:
loop1
coord=$e1,$n1
loop2 (3 Replies)
Discussion started by: gazz1982
3 Replies