10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
An argument example:
../path/cse/lab3/remove
Right now, it's printing out all the directory and files in 'lab3'.
I want it to print out all the files in 'remove'.
I'm not sure how to do that. (I want to use a for loop)
2.... (2 Replies)
Discussion started by: spider-man
2 Replies
2. Shell Programming and Scripting
Hi Everyone,
I have a ksh script that queries a database. The query output looks like this:
$queryResult =
echo ${queryResult} = name1
echo ${queryResult} = age1
echo ${queryResult} = name2
echo ${queryResult} = age2
...
I need to insert those values into a new array that would... (2 Replies)
Discussion started by: practitioner
2 Replies
3. Shell Programming and Scripting
Hello experts,
I need help in my code. I have an input file like this:
100814 1205 1724127 7451382 -10 00:30:1b:48:92:3a
100814 1206 1724127 7451382 -72 00:30:1b:48:92:3a
100814 1207 1724127 7451382 -72 00:30:1b:48:90:3b
100814 1208 1724127 7451382 -72 00:30:1b:48:92:3a
100814 1209... (12 Replies)
Discussion started by: enes71
12 Replies
4. UNIX for Dummies Questions & Answers
hi,
I'm a newbie to shell scripting. I wanted to initialise an array using basic for loop and read it.
Then i want to print it as a .CSV file..
Any help would me much appreciated.. (1 Reply)
Discussion started by: pravsripad
1 Replies
5. Shell Programming and Scripting
Hi all,
Simple question, how can I simply create an array from listing the files in a directory i..e
myvar=`ls`;
echo $myvar gives a fulllist of files/ directories
how can I now convery myvar to an array so I can loop around and read each file/dir?
Thnaks
CF:) (6 Replies)
Discussion started by: cyberfrog
6 Replies
6. Shell Programming and Scripting
echo "what is your username?"
read username
echo $username
echo /home/$username
$backup="backup"
$restore="restore"
#
#
if
then
echo "No username provided"
else
echo "hi $username would you like to backup or restore?"
read userrequest
echo $userrequest
if
then
... (4 Replies)
Discussion started by: EwanD
4 Replies
7. Shell Programming and Scripting
Hi,
The logic is very simple but I can't seem to make this work in Korn shell.
I need to check two files to make sure there is no errors. Each of the file will have number. For example, first file btt.txt will have 112 which is good. Second file bgg.txt will have 6 which is also good. If I... (4 Replies)
Discussion started by: samnyc
4 Replies
8. Shell Programming and Scripting
Hi there,
I was trying to add a line of text in the middle line of a file.
I have counted the lines in the file, and then I divide it into 2, after that I am stuck on how am I suppose to append the line on that file? When I tried to use this command 'second line >> filename' it appends it at... (3 Replies)
Discussion started by: felixwhoals
3 Replies
9. Shell Programming and Scripting
Hi,
Simple question I am sure...
I need to put yesterdays date in the name of a filename, ie assign yesterdays date to a variable and then I can use it where I want.. using the format yyyymmdd
Any suggestions? (1 Reply)
Discussion started by: frustrated1
1 Replies
10. UNIX for Dummies Questions & Answers
i'm not looking for anything that deals with "if-then" scripts.
i'd like something simple on how to run a series of processes. for example the following:
1. ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/
2. lcd /
3. get pkgsrc.tar.gz
4. bye
5. cd /usr
6. rm -rf pkgsrc
7. cd... (3 Replies)
Discussion started by: xyyz
3 Replies