10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
I want to compare a list of numbers in the file TEST01 to the variable $Post. Also remove any duplicate numbers. Create an if then statement indicating if the numbers listed in TEST01 is less than the number value of $Post then print an error message.
Here is the contents of... (5 Replies)
Discussion started by: seekryts15
5 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have a text file named "foreach.txt" which reads like ---
foreach cal ( 1 2 3 4 5 )
I am using a simple script which looks like ---
#!/bin/tcsh
foreach cal (1 2 3 4 5)
echo "$cal"
end
Is it possible to modify the script in such a way that instead of writing
foreach cal (1... (6 Replies)
Discussion started by: Indra2011
6 Replies
3. Shell Programming and Scripting
Hi, coding a simple program to compare an entered number to a randomly generated one. The number of digits are restricted so I'm just trying to figure out how to refer to the index value in a string and then compare it to the variable I want. I don't know if bash automatically indexes strings, so... (7 Replies)
Discussion started by: outofcookies
7 Replies
4. Shell Programming and Scripting
Hi there
this script is an atempt to define which instances of Jboss relate to its PID by the date and timestamp I am using calc to test with. On our system the only way you can tell which instance relates to a particular instance is by looking at the start up time and date in a log.
The... (9 Replies)
Discussion started by: nathan.harris
9 Replies
5. Shell Programming and Scripting
Hey all,,
I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use.
lets say i have a list..
set arr=(x y z e f)
I wanna iterate the list with foreach ,, not with while.!!
foreach i $arr
echo $i
end
does not work (2 Replies)
Discussion started by: eawedat
2 Replies
6. Shell Programming and Scripting
I have a list of markers, say marker.txt:
rs913257
rs1018390
rs764180
and I need to know which ROW that each marker appears in another map file, say map.txt:
a rs12354060
b rs913257
c rs6650104
d rs2185539
e rs6681105
f rs1018390
g rs764180
h rs12564807
i rs3094315
The result... (4 Replies)
Discussion started by: Zoho
4 Replies
7. Shell Programming and Scripting
Hi,
I am trying to write a script to show the status of a Network card.
Variables:
chosennic is a read variable
statuss=`/sbin/ifconfig $chosennic | grep MTU | awk '{print $1}'`
ipadd=`/sbin/ifconfig $chosennic | grep Bcast | awk '{print $2}' | awk -F : '{print $2}'`... (2 Replies)
Discussion started by: mikejreading
2 Replies
8. Shell Programming and Scripting
Hello all
while writing a small script , i got stuck with this simple thing.Hope you guyz can help.
Iam trying to read password
echo"enter password"
read $pwd
now i have to check this
echo"enter password to proceed"
read $pwd
now i have to check both the values of the... (2 Replies)
Discussion started by: coolkid
2 Replies
9. Shell Programming and Scripting
Hi all,
I need to compare the contents of 2 directories where the file contents are similar and take out the filenames whose contents does not exist within the 2 directories.
Directory1
1
2
3
4
Directory2
54
55
56
57
Does anyone has a script which can do this?
At the end of... (6 Replies)
Discussion started by: manualvin
6 Replies
10. Shell Programming and Scripting
Hello,
I just want to know how If it's possiple to define 2 variable using foreach command ???
I have directory inside that directory around 1000 file, I want to rename all of this files to something I have it in a list. Example :-
------This is what in my directory----------
d1
d2... (14 Replies)
Discussion started by: geoquest
14 Replies