10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Let say I have a file with variables (Test1.txt)
In Test1.txt file, it consists of
Tom is a boy
Jim is a dog
In the other scripting file (RunTest1.sh), I have
#!/bin/ksh
filename = /directory/Test1.txt
cat $filename
for i in $filename
do
print $i
done
I managed to call... (1 Reply)
Discussion started by: TestKing
1 Replies
2. Shell Programming and Scripting
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I have same file with like 1xyz_1 ,1xyz_2 , 2ghj_1, 2ghj_2, 4wer_1, 4wer1_2 etc with lots of file having similar type of name. I want to creat folder and copy similar file to that folder. for example folder 1xyz should contain only 1xyz_1 ,1xyz_2. :mad:
Thank you in Advance.
... (7 Replies)
Discussion started by: XXLMMN
7 Replies
4. Shell Programming and Scripting
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Discussion started by: ccorder22
2 Replies
5. Shell Programming and Scripting
Hi,
I have an issue that hope someone will be able to help me with....
I'm using a while-read loop to read lines from a file that contain variables, and I want the variables substituted, but I can't get it to work - the below example with explain:
while read line
do
echo $line
... (5 Replies)
Discussion started by: AndyG
5 Replies
6. Shell Programming and Scripting
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
Discussion started by: Andy_ARG
5 Replies
7. Programming
Hello everybody,
I am having problem in converting byte array variables to Hexa String variables for Linux. I have done, converting byte array variables to Hexa String variables for Windows but same function doesn't work for linux. Is there any difference in OS ? The code for Windows is given... (2 Replies)
Discussion started by: ritesh_163
2 Replies
8. UNIX for Dummies Questions & Answers
echo "Please enter your surname\n"
echo "followed by your first name:\c"
read name1 name2
echo "Thank you"
echo "Now please enter your age"
read age
echo "Thanks again, we're nearly done. Please enter your town of birth"
read town
echo "Hi there $name2 $name1"
sleep 3
echo "erm..."
sleep... (6 Replies)
Discussion started by: phproxy
6 Replies
9. Shell Programming and Scripting
I have a remote server that generates files with name format:
Daily_Generated_File_11-14-07.txt.
The file name remains the same regardless, but the date portion at the end of the name will change (mm-dd-yy). Can someone supply a script that will search for files with the latest date based on... (19 Replies)
Discussion started by: bbbngowc
19 Replies
10. Shell Programming and Scripting
file.txt contains
------------------
sat1 1300
#sat2 2400
sat3
sat4 500
sat5
I need to write a shell script that will output like the below
#output
sat1.ksh 1300
sat3.ksh
sat4.ksh 500
sat5.ksh
my try
------- (4 Replies)
Discussion started by: konark
4 Replies