10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i am a beginner i m learning shell by myself
i have problem writing a korn shell that takes an absolute pathname to directory and display all ordinary files in the directory ordered by their length.
i was thinking use grep ls sort and sed. maybe, i m wrong! can someone tell me? (2 Replies)
Discussion started by: babuda0059
2 Replies
2. Shell Programming and Scripting
Write a KSH script called cleanse which displays the name of each file in a given directory and allows the user to interactively decide whether or not to keep or delete the specific file.
Notes: Again, please check for errors.
can any one help on this problem ?? (1 Reply)
Discussion started by: babuda0059
1 Replies
3. Shell Programming and Scripting
Write a function called dateToDays that takes three parameters -a month string such as Sep, a day number such as 18, and a year number such as 1962-and return s the number of days from January 1, 1900, to the date.
Notes: I am asking you to account for leap years.
my script is not... (0 Replies)
Discussion started by: babuda0059
0 Replies
4. Shell Programming and Scripting
In a Korn shell script I have,
cat ../header | sed -e 's/flag1/$cnumb/g' > header.txt
The header is short
{{Company flag1}}
But the result in header.txt is
{{Company $cnumb}}
The value of $cnumb is 120. I am trying to get the value of $cnumb into the header.
I have tried /'$cnumb'/g,... (10 Replies)
Discussion started by: jcarrott
10 Replies
5. Shell Programming and Scripting
I got the task writting Korn Shell script to automate the tuxedo login so that users neednot have to enter options manually. I have done that using expect tool from the Unix but my manger told me its not secure so you have to do that using Kornshell without using Expect. Here is the way to login to... (0 Replies)
Discussion started by: pareshan
0 Replies
6. Shell Programming and Scripting
Hi all, I am new to these forum and to scripting in general for that matter. i have been looking through the forums for something that could explain my problem. I have be come pretty familiar with sed and awk but I can not seem to figure this out... I am trying to match data from 3 files but every... (4 Replies)
Discussion started by: derek3131
4 Replies
7. Shell Programming and Scripting
My Korn shell script below is giving me the following error: ./test.ksh: 0403-057 syntax error at line 7 : 'then' is not matched.
Can anyone provide a quick solution as to why the error is occurring? Thanks.
#!/usr/bin/ksh
typeset -i RecCount
typeset -i RecCount2
RecCount=`db2 -x "select... (23 Replies)
Discussion started by: sasaliasim
23 Replies
8. UNIX for Dummies Questions & Answers
hi all, I have read similiar topics in this board, but i didn' t find the posting which is the same with the problem i face.. I try to extract string from the end. i try to do this:
num=abcdefghij
num2=${num:-5}
echo $num2 #this should print the last 5 characters (fghij)
but it doesn;t... (3 Replies)
Discussion started by: nashrul
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Need some simple find help.
I need to search for all .so files within sol directory.
My directory tree has mix of directories and i want to search only inside sol directory.
I could get this done combining find with for, any option to do this with find alone.
for a in `find .... (13 Replies)
Discussion started by: vibhor_agarwali
13 Replies
10. Shell Programming and Scripting
I have to copy an array to a temp variable and back after doing some functions. I am trying to see if it is possible to do without while loops.My closest try was
set -A temp ${THE_ARRAY}
# restore array after some actions
set -A THE_ARRAY ${temp}
The problem with above is that, the new... (1 Reply)
Discussion started by: vijay1985
1 Replies