10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear unix wizards,
I'd be very grateful for your help with the following.
I have a hypothetical file (file.txt) with three columns:
111 4 0.01
112 3 0.02
113 2 0.03
114 1 0.04
115 1 0.06
116 2 0.02
117 3 0.01
118 4 0.05
Column 2 consists of pairs of integers from 1 to 4 (each... (5 Replies)
Discussion started by: aberg
5 Replies
2. Shell Programming and Scripting
Hi all,
Please guide me writing this script
Follwing is the file which I have created, which contains the files to be copied.
cat system1-dr.txt
/etc/passwd
/etc/shadow
/etc/group
/etc/vfstab
/etc/profile
/etc/default/init
/etc/shells
/etc/dfs/dfstab
/etc/dfs/sharetab... (11 Replies)
Discussion started by: manalisharmabe
11 Replies
3. Shell Programming and Scripting
Hi,
I am completely new to shell scripting. Basically I am wanting to create a simple while loop script to check if a network connection is available from 'netstat -a' and if its present then output a character to the serial port. I think i am nearly there.. but need some assistance.. this is... (9 Replies)
Discussion started by: zippyzip
9 Replies
4. Shell Programming and Scripting
Maybe because its Friday, but I can't get a simple while loop to work!
#!bin/bash
i=0
while
do
echo "Hello"
((i++))
done (17 Replies)
Discussion started by: linuxkid
17 Replies
5. Shell Programming and Scripting
I am trying to create a simple ksh loop script. What I've pasted below is not working. Any help is appreciated.
typeset -i count
typeset -i tcount
count=0
tcount=0
while $tcount >= 11
do
print "\$count is $count"
pwd
ls -l
sleep 30
$(( $tcount = $count + 1 ))
... (5 Replies)
Discussion started by: musikman65
5 Replies
6. Shell Programming and Scripting
Hi everyone, I am facing to one shell script problem, which is as following
Write a shell script that:
Takes a number of arguments.
For each argument, print out all files in the current directory that contain this substring in their name.
I know I need to use grep for the second... (7 Replies)
Discussion started by: shaloovia
7 Replies
7. Shell Programming and Scripting
Hi everyone - I am sure this is a really simple problem but I'm a total noob at Linux scripting:
I wanted to create a script that allows me to compare the current week number to the contents of a text file in my home directory:
VAR1='date +%V'
VAR2='cat /home/fred/file.txt'
... (6 Replies)
Discussion started by: FiniteRed
6 Replies
8. Shell Programming and Scripting
I'm just trying to make a script that runs in command line to echo each line in a text file. Everything i found on google is telling me to do it like this but when I run it it just echos removethese.txt and thats it. Anyone know what im doing wrong?
for i in removethese.txt; do echo $i; done
... (4 Replies)
Discussion started by: kingdbag
4 Replies
9. Shell Programming and Scripting
Hey all. Thanks in advance for any help you can give, hopefully this is an easy one. I want to create a loop to run a simple performance monitor like vmstat and record it to a file, but have very limited scripting skills (obviously).
Starting with this...
date >> /var/log/perfmon.log
vmstat... (2 Replies)
Discussion started by: mattlock73
2 Replies
10. UNIX for Dummies Questions & Answers
hi all. i have a little problem. im basically reading input from the user from the keyboard into the variable "phonenumber". I want to do a little error check to check if the user doesnt enter anything in for the value phonenumber.
i had this:
read phonenumber
if
then
.....
else
........ (2 Replies)
Discussion started by: djt0506
2 Replies