10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Below is the command
mv AP_FLEXCUBE_INTERFACE10.txt FTPYMNTE_`date "+%Y%m%d%H%M%S" | tr '' ''`.TXT
it is changing the file name to a different name according to time stamp dynamically. I want to capture that dynamic file name present in the directory to a variable .
After that i want to... (6 Replies)
Discussion started by: sujit das
6 Replies
2. Shell Programming and Scripting
I have a variable and assigned the following values
***XYZ_201519_20150929140642_20150929140644_211_0_0_211
I need to read this variable from backward and stop read when I get first underscore (_)
In this scenario I should get 211
Thanks
Kris (3 Replies)
Discussion started by: mkris
3 Replies
3. Shell Programming and Scripting
cat a1
scott
robert
tom
test
script :
#!/usr/bin/ksh
for NAME in `cat a1`
do
VALUE=`sqlplus -silent "nobody/bobody01@testq" <<END
set pagesize 0 feedback off verify off heading off echo off
select username from dba_users where username=upper('$NAME');
END`
if ; then
echo... (3 Replies)
Discussion started by: jhonnyrip
3 Replies
4. Shell Programming and Scripting
Hi Guys,
i have a file where data is in the below format::
data1 data2
data3 data4
data4 data6
my script written as::
#!/bin/ksh
cd $1
at now <<END
sh $2
END
Here i want to pass the values stored in the above file one by one till the end of line.
Here if i am doing it as:: (2 Replies)
Discussion started by: Atp3530
2 Replies
5. UNIX for Dummies Questions & Answers
hi i just cant figure out how can i do this ls -lt > log.txt using $PWD
what i mean is how can i get the ls command content into a file using $PWD variable? :confused: (4 Replies)
Discussion started by: chinababy
4 Replies
6. Shell Programming and Scripting
Hi All,
I am passing a file value as parameter to awk command;
Par.txt
A|B
Input.txt
A,1
B,3
C,4
D,5
My desired output should be
A,1
B,3 (4 Replies)
Discussion started by: kmsekhar
4 Replies
7. Shell Programming and Scripting
Hi all,
I have a script in file1 which gets input from the user say variable "TYPE". This variable is present in the other file2. I want to replace the variable in the file2 with the value given by the user and print the file. How can I achieve this task?
file1
code
echo "Give... (3 Replies)
Discussion started by: Ananthdoss
3 Replies
8. Shell Programming and Scripting
following on from below link
https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569
i will be using file reading in while loop say for example
while read line123
do
echo "line read is $line123"
insert_funct $line123
done< mysqldump.sql... (6 Replies)
Discussion started by: vivek d r
6 Replies
9. Shell Programming and Scripting
Hello,
I have following problem.
I have the result of a database request. I preparated the result via sed, etc. as a string in a file.
The string in the file is:
($3==1 || $3==2 || $3==3 || $3==4)
Now I want to use the String as a command in an if-statement.
So I assigned the string to a... (3 Replies)
Discussion started by: Dr_Aleman
3 Replies
10. Shell Programming and Scripting
I may not being doing this description justice, but I'll give it a try.
I created a mailx script; there will be several messages using the same script where the only difference is the content. So I figured I'd make the content of the message a variable retrieved from a separate file. I have five... (5 Replies)
Discussion started by: royarellano
5 Replies