10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
2. Shell Programming and Scripting
I want to make the file test condition a variable ($Prmshn in code below).
My goal is to use something like the first three unsuccessful if statetments since the 'if
#the following three if statments fail:
#if ] ;... (10 Replies)
Discussion started by: ms63707
3. Shell Programming and Scripting
I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values
tstmb.sh: 1.5321e+08: 0403-057 Syntax error
Below is my code snippet.
for file in $(ls -rt *.log | tail... (11 Replies)
Discussion started by: kiran1112
4. Shell Programming and Scripting
Can you please tell me what is wrong with this line:
if && ]; then
basically i want to check if x = 12 and F (Filename) end with 'g'. But it is throwing syntax error. (7 Replies)
Discussion started by: rtagarra
5. Shell Programming and Scripting
Is there a way to compare the value in if condition with a list of values.
eg . if ]
echo "it's a mammal"
echo "its not"
Thanks! (8 Replies)
Discussion started by: neil.k
6. Shell Programming and Scripting
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Discussion started by: kchinnam
7. Shell Programming and Scripting
I'm working on a function in a shell script I'm writing that will eventually take in and print out a list of vendor names and aliases (for my work) Here's the function in question:
echo -n 'Would you like to create a new vendor list (y or n)? '
read answer... (3 Replies)
Discussion started by: Straitsfan
8. UNIX for Dummies Questions & Answers
Hi, can someone please tell me what is wrong with this code? I just want it to check if the file size is greater than 2000kb.
---------- Post updated at 09:23 PM ---------- Previous update was at 09:21 PM ----------
I should probably post the full code:
#!/bin/sh... (9 Replies)
Discussion started by: Bengel
9. Shell Programming and Scripting
Can you please help me with this one: I write an "if" statement, something like this:
echo "big file"
echo "normal file"
and I get an error: `'then is not expected
Thanks in advance (6 Replies)
Discussion started by: apenkov
10. Shell Programming and Scripting
Has been a while since I was last on, so I hope everyone has been doing fine. ;)
Would like to know if the below IF statement syntax is correct for a ksh environment. It's been pushed into live as someone had deleted the development copy(!); not withstanding that, the statement now... (3 Replies)
Discussion started by: Cameron