10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, All:
I have one for ... loop code to generate a list of rename statement. However, echo the loop output on screen is OK. But store the echo output into a file is not working. So come here to seek help. My basic code is:
! /bin/ksh
echo > DAS_VetFed.txt
dir=/mydirectory
cd $dir
files=`ls... (6 Replies)
Discussion started by: duke0001
6 Replies
2. Shell Programming and Scripting
Currently using below script but echo it print the output in two line.
Input file all-vm-final-2.txt
CEALA08893 SDDC_SCUN DS_SIO_Workload_SAPUI_UAT_01 4
CEALA09546 SDDC_SCUN DS-SIO-PD5_Workload_UAT_SP1_Flash_07 4
CEALA09702 SDDC_SCUN DS-VSAN-RMP-WORKLOAD01 4
DEALA08762 SDDC_LDC... (3 Replies)
Discussion started by: ranjancom2000
3 Replies
3. Shell Programming and Scripting
Hello
i have a file with this format:
ip.txt content:
192.168.1.1/2020
192.136.1.2/2028
192.168.1.10/3047
....
need to create 1000 files and each files content, import data from ip.txt line (first file with first line data, second file with second line...etc)
internal=yes
internalip=... (14 Replies)
Discussion started by: nimafire
14 Replies
4. Shell Programming and Scripting
Hi, I am trying to make a script to manage log. I want to write the name of the .gz I moved and the date :
for i in `ls $replog/*.gz`
do
echo " $i "
`echo $i date +%d:%m:%Y`
`echo $datee `>> $replog/mrnet.log
mv $i /var/log/vieux-logs
done
I need to echo... (10 Replies)
Discussion started by: Dabless
10 Replies
5. Shell Programming and Scripting
Hello,
In one part of my shell program I need to translate many of lines in the following pattern :
/(folder1|...|folderN)/(sub1|...|subN)/.../(file1|...|fileN)
into strings :
/folder1/sub1/.../file1
/folder1/sub1/.../...
/folder1/sub1/.../fileN
...
/folderN/subN/.../fileN
the... (2 Replies)
Discussion started by: Ghadamyari
2 Replies
6. Shell Programming and Scripting
HI
i like to concatenate the two variables
var1=$line (ie 22885068900000652 B86860003OLFXXX592123320081227)
var2=$amount (ie 123456)
i want to club together both the above varaible var1 & var2 and assign back to var1
right now i am doing like this but it is not working.
var1=`echo... (1 Reply)
Discussion started by: kshuser
1 Replies
7. UNIX for Dummies Questions & Answers
Googling the answer to this question just doesn't work when Google won't search your symbols for you. Can someone tell me what this command will assign to var2, and where I can find more information about using braces in this way?
var2=${var1#??????????}
Thanks so much. (2 Replies)
Discussion started by: blondie53403
2 Replies
8. Shell Programming and Scripting
OK, while I'm not new to the Mac or some of the the inner workings of Mac OS X I am quite new to scripting. And while I have "Learning the Bash Shell" by those lovely people at O'Reilly (Cameron Newham et. al.) I'm missing something, I just know I am.
Here's the problem:
At the beginning of... (2 Replies)
Discussion started by: woodgie
2 Replies
9. UNIX for Dummies Questions & Answers
*EDIT -- **FIXEd I must've done something wrong, because it works now..
I punched in "if" in the forum search but nothing came up, so I'm posting it here.
Quick question: Can someone correct my syntax.
#!/bin/ksh
if (( var >= 1 && var <= 5 )); then
.................................. (1 Reply)
Discussion started by: yongho
1 Replies
10. Shell Programming and Scripting
I have three arrays which hold three elements each.
I have a fourth array which contains the names of those three arrays.
I'm having difficulty creating a nested loop that can loop through each array and echo their values.
script
#!/bin/ksh
# array of locations (usa, london, australia)... (1 Reply)
Discussion started by: yongho
1 Replies