10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I wrote the following case statement to replace a series of 'ELIF' statements as it looks better and is easier to maintain. However, for some reason the commands don't fully work in this format. Take option 1. It should call a script that runs in the background but it doesn't work. Can anyone... (3 Replies)
Discussion started by: user052009
2. Shell Programming and Scripting
I want to search a file if it contains special strings and if yes, the records found should be mailed.
I can either do it with a temporary file:
/usr/bin/grep somestring somefile > /tmp/tempfile && /usr/bin/mail -s "Found something" email@example.com < /tmp/tempfile... or by running the grep... (10 Replies)
Discussion started by: Cochise
3. Shell Programming and Scripting
I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive.
i tired using Ip at the end in the below command. but in ksh it is not working.
sed -n "/$variable/,/constant/p" file
i also... (11 Replies)
Discussion started by: johnjs
4. Shell Programming and Scripting
I'm really new ro shell scripting (actually any kind of programming) and am pretty sure I'm making a pretty basic error here but I can't for the life of me figure it out.
What I'm trying to do is get an array working with a case statement in a KSH script. The code is as follows:
... (3 Replies)
Discussion started by: SReilly
5. Shell Programming and Scripting
What is the command to change the contents of a file to UPPER case. Here in this file below you see some characters are Sp, Ch
22885093700000652-B94030001ODL-Ch592123520081227... (4 Replies)
Discussion started by: kshuser
6. UNIX for Dummies Questions & Answers
I have a script like below :
echo "Do you want to export all docs ?"
echo "Do you want to export template or report only "
case && ]
case && ]
case && ]
;; (4 Replies)
Discussion started by: luna_soleil
7. UNIX for Dummies Questions & Answers
I ve been trying to build another shell where I am using the following code.
case "$transact" in
... (4 Replies)
Discussion started by: hkansal
8. Shell Programming and Scripting
I am trying to write a ksh script using the case statement to select certain directories to remove. The directories that I am looking for are in the following format 2008-10-10. I want to exclude all other files/directories that contain anything other the 4 digit year,a dash, 2 digit month, a... (2 Replies)
Discussion started by: dgilc
9. UNIX for Dummies Questions & Answers
Outside this process I built a file containing snmp response filtering for hostname, model type and ios version.
I want to get a count across the network of those devices running 11.x code, 12.0 mainline, 12.0 T train and above, 12.1 and above and OS levels.
This works ok .. but its cheap... (2 Replies)
Discussion started by: popeye
10. Shell Programming and Scripting
Isn't any "NOT" operator that can be used in the case construction like :
case $VAR (NOT) in
option1 | option2 | option 3...) COMMAND ;;
Or something similiar to the "default" from switch, so I could at least do something like this:
case $VAR in
... (2 Replies)
Discussion started by: 435 Gavea