Trying to take a character in a variable and change it to ascii value. Found a thread wher Ygor replied with the following:
read
echo $REPLY| od -b | read x y z
let ASCII=8#${y}
echo $ASCII
This converts the value you enter to a number but I cannot figure out the commands that is doing the...
cptk
thanks for your answer. My problem is the number of lines in the text file can range from 1 to 10, so I'm not sure how many I would have in a run.
Sorry, I forgot an important part of the script. On the done statement is the file that I'm reading. The script has been updated.
rm -f finalout.txt
while read tabname;
do
echo 'Do you want to export '${tabname}
echo 'reply Y to export, N to skip'
read ans1
echo ${ans1}
if [ $ans1} = 'Y'...
Looking for some help again with my scripting. I'm trying to read a file and for each entry in the file I want to ask the person running if they want to export that table. If they do, I put the table name in a final output file.
the file I'm reading has
book
chapter
case
My part of the...
Looking for some help from the sql server community.
Does sql server have the oracle equivalent of "License high water mark" which is the total number of users that signed on to the database since the last time it was started?
thanks in advance.
thanks to olded and PHV for your answers.
olded,
when I tried yours it matched correctly but printed the
matching results with the first line in the file, not by
itself. That part I should be able to work out.
PHV
olded was correct and I changed your awk to nawk on my system and got the...
I'm hoping someone can help me. I'm trying to awk a file to find a specific word and then pull the next word from the file.
There was an example in February 27, 2003 with the following
example:
awk '{if (match($0,/abcde:/)) print substr($0,RSTART+RLENGTH+1)}' filename
It was entered by...
I could use some help.
I want to write a perl script to report disk space(ie. total space, used, free, etc) on all the windows servers we have for our sql server data.
I can provide the server/drive to the script if I need to, but what perl commands pulls the information? I'm stuck on where...
dmazzini
I appreciate all the information you provided. As I said before I'm not that familiar with Perl so all information I receive helps me very much.
It appears that all the examples are trying to find the difference between two dates. I'm trying to find out what the "date" is when I...
I have a script that gets current date using localtime and previous day using localtime - 60 * 60 * 24. This forum was very helpful in the commands to do this.
My question is will I get the correct previous day on January 1? What about March 1 in leap years. Not being that familiar with Perl...
mikevh and figmatalan
You are sooooo right. Not sure how I messed up the first script that figmatalan provided to me, but by using your result code I could see that the command was being split. I put the chomp back in and the output is going where it should go. Thank you both very much.
figmatalan
I'm sorry but I do not see any difference in your move from the two I tried. I must be missing something, but I tried your code and had to remove the chomp for it to run. The results were the same, it did not move into the currdir2 directory.
thanks, I tried
`MOVE "H:currdir1\\$line H:\\currdir2"`;
`MOVE "H:\\currdir1\\$line H:\\currdir2"`;
The results still go into the directory I'm running from. It's acts as if the second parameter does not exist.
I have code that I'm trying to move matching files from one directory to another. When this runs it does not move the files to the directory I have on the move line. It moves to the directory I'm running from. Can someone more familiar with perl help?
Here is the code:
-----
#!C:\perl
my...
Paul
Thank you for your help. I'm not sure if I explained this scenario clearly. I'm trying to read all files when I start so only those files, not new ones being written to the directory while I'm running get's moved.
Will the opendir or readdir, read all files in the directory at once? In...
Sorry if this has been answered but I have not found an example for what I'm trying to do.
I'm trying to:
1. Get a list of all filenames(not directories or . and ..) currently in a directory.
2. Use the contents of that list to move just those files to another directory.
This seems so...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.