10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
#!/bin/bash
X=$(</home/cogiz/computerhand.txt) # (3S 8C 2H 6D QC 8S 4H 5H)
Y=$(</home/cogiz/topcardinplay.txt) # KS
A=( "${Y::1}" )
B=( "${Y:1}" )
for e in ${X}; do
if ]; then # searching for valid cards K,S or 8
... (0 Replies)
Discussion started by: cogiz
0 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
3. Shell Programming and Scripting
Hi All please help if possible. I am a Unix novice. I have a similar question to the one posted by yonderboy at about a year ago. However his solution does not work for me.
The pseudo code for my problem is as follows:
for fund in 1 2 3 4
if (FTP is successfully) then
FILE_SENT_fund... (2 Replies)
Discussion started by: Seether
2 Replies
4. Shell Programming and Scripting
Hi,
I need help on for loop need to add domain and IP
In domain list
1.com
2.com
3.com
In Ip list
1.1.0.1
1.2.0.1
1.3.0.1
1.com 1.1.0.1
2.com 1.2.0.1
3.com 1.3.0.1
I need to excute this command (4 Replies)
Discussion started by: ranjancom2000
4 Replies
5. Shell Programming and Scripting
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
6. Shell Programming and Scripting
Sorry for such a dreadful title, but I'm not sure how to be more descriptive. I'm hoping some of the more gurutastic out there can take a look at a solution I came up with to a problem, and advice if there are better ways to have gone about it.
To make a long story short around 20K pieces of... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
7. Shell Programming and Scripting
I can't seem to solve this problem. :mad::mad: Please assist. Thanks!
#!/bin/bash
UserDir="$(echo ~$1)"
echo "Changing directory with variables"
cd "$UserDir"
echo "Changing directory without variables"
cd ~pearsn
pwd
Output:
pearsn$ sh -x ./test.bash pearsn
++ echo '~pearsn'
+... (6 Replies)
Discussion started by: twinturbos52
6 Replies
8. Solaris
In FORMAT->ANALYZE->SETUP there's a couple variables you can set for the various functions. However, everytime I exit format it reverts back to the defaults. Is there a file I can edit somewhere to change these default settings? (0 Replies)
Discussion started by: cheetobandito
0 Replies
9. Shell Programming and Scripting
hey guys. i'm new to shell scripting but not new to programming. i want to write a script that will take all the files in the current directory that end with a particular filetype and change all their names to a number in order. so, it would take all the jpg files and sort them in alphabetical... (30 Replies)
Discussion started by: visitorQ
30 Replies
10. Shell Programming and Scripting
hi friends,
i'm new to shell scripting,can i know how to change the environment variables without altering anythng in .bash_profile as the change in it is for a specific user but i want the change to be available to every user who logs in.
bye. (1 Reply)
Discussion started by: amit4g
1 Replies