10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter.
Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)
Discussion started by: mysocks
5 Replies
2. HP-UX
Can anyone help me in solving this ?
p=`date`
e=`echo $p | awk '{print $2,$3}'`
# echo $p
Wed Aug 4 12:00:08 IST 2013
but when I am echoing the value of e it is giving me with one space. As shown below:
# echo $e
Aug 4
I need this value to be exact as found in... (6 Replies)
Discussion started by: Kits
6 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have been racking my (limited) brains to get this to work without success
I have a file output which is a list of lists - ie a single column of data that is separated by space into sub lists below - I need to both split this so that each list is in a separate column (eg tab or semicolon... (8 Replies)
Discussion started by: Manchesterpaul
8 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a large number of files which are written as csv (comma-separated values).
Does anyone know of simple sed/awk command do achieve this?
Thanks!
---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ----------
Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies
5. Shell Programming and Scripting
I want to pass this array as a parameter.
IFS=$'\n'
fortune_lines=($(fortune | fold -w 30 ))
Inside of this line
screen -p 0 -S ${SCREEN_SESSION} -X stuff "`printf "say ${fortune_lines}\r"`"
And I am lost at this point.
I am thinking something like this?
Then make it loop..
... (7 Replies)
Discussion started by: briandanielz
7 Replies
6. Shell Programming and Scripting
How do I loop thru space separated values in a variable?
I hate to use very complicated counter increment logic for this kind of simple problem.
Expected result(using ksh)
$>echo "aaa bbbb cccc" | <looping code here>
var=aaa
var=bbbb
var=cccc
$>echo "aaa bbbb cccc" | while IFS=" "... (12 Replies)
Discussion started by: kchinnam
12 Replies
7. Shell Programming and Scripting
hi all,
i am experiencing an error which i think an incorrect syntax for the where clause passing a variable was given. under is my code.
sqlplus -s ${USERNAME}/${PASSWORD}@${SID} << END1 >> $LOGFILE
whenever sqlerror exit
set serveroutput on size 1000000
declare
l_rc ... (0 Replies)
Discussion started by: ryukishin_17
0 Replies
8. Shell Programming and Scripting
Taking inputs in the script which is space separated and passing this to a function and i have assigned like below
And then when I use for loop for the inputs i got from the user, it is taking only the first argument.
Enter Names : Bala Sundar Sridhar
read names
namesCheck $names
function... (7 Replies)
Discussion started by: balamv
7 Replies
9. Shell Programming and Scripting
Hi,
I've been trying to use grep to find out all the files which have two particular patterns in it (both pattern1 AND pattern2). I have a script to do the same, in which I'm getting the output of the first grep (with -l option) which contains the list of file paths and I'm trying to search for... (3 Replies)
Discussion started by: NanJ
3 Replies
10. Shell Programming and Scripting
Hi, Thanks for looking,,,,
(kornshell)
tmp3 is a list of line numbers
I want to print the lines from my list
code:
while read j
do
echo $j #works fine
echo $filename #works fine
#sed "'$jp'" "$filename" ... (7 Replies)
Discussion started by: JohnMario
7 Replies