Shell question about placement of #! /bin/ksh
Hi, This is a weird situation that I have noticed - If I have the following shell Code: #! /bin/ksh         #use korn shell . /cpspb/logicals.ksh    #execute logicals set -o allexport...
View ArticleLdapsearch takes minutes when using FQDN vs IP
Hey All, ldapsearch takes minutes when using FQDN vs IP. What could be some of the reasons for that? Cheers, DH
View ArticleRecursive folder search faster than find?
I'm trying to find folders created by a propritary data aquisition software with the .aps ending--yes, I have never encountered folder with a suffix before (some files also end in .aps) and sort them...
View ArticleCan a script resize it's own mintty console?
I'm looking for finer granularity than the 20 ANSI escape sequence screen modes. What I'd like to do is have the terminal increase it's own height when I have to show the user a long menu. Platform is...
View ArticleDisable xen machine to auto start on reboot
Hello Guys - I need to disable xen server not to start when the server is rebooted. 1) What is the parameter to be used to do this..below is the entry in my config file... Code: on_reboot = "restart"...
View ArticleExpanding a globed variable name
Heyas I'm trying to give some information on used variables. While the first two work fine, the ones starting with a glob (is that the proper term?) fail. Code: echo ${!TUI_*} ${!RET_*} ${!*_CLI}...
View ArticleControl machine and check value
I'm thinking how to control and execute command to control my machine like update them, scenario is creating a cron in machine 1 machine 2 machine 3 which download .txt file from core machine, this txt...
View ArticleTput cup, print on current line?
Heyas I'm thinking about a new approach for my core display, basicly as it should make aligments easier. Issue i'm currently facing, is tput cup capable of printing on the current line? My best...
View ArticleCopy text and create new file
I have a directory with ~500 files that look like below. I need to copy up until the second_ in each line and put a .txt in place of the _. Thank you :). Code: cp file1.txt "$(cat output.txt)"...
View ArticleRun a command for specific amount of time with an auto key press
Hi, I have been trying to do a small fun project for myself. I want to run a command for 45 seconds. And to get the final output of this command, the script requires I push the "q" key on my keyboard...
View ArticleSyncing Multiple Music Collections, Can rsync help?
Hello, I have two laptops one office and one personal. The office laptop is a Lenovo T430s 16GB RAM running Windows 7 and the Personal Laptop is a hp Pavilion dm4 Laptop dual booted with Windows 7 and...
View ArticleParallel processing for functions in xargs
I have a script (ksh) which tries to run a function in parallel for performance gains. I am also trying to limit the number of parallel child processes to avoid overloading the system by using a...
View ArticlePattern replace from a text file using sed
I have a sample text format as given below Code: <Text Text_ID="10155645315851111_10155645333076543" From="460350337461111" Created="2011-03-16T17:05:37+0000" use_count="123">This is the first...
View ArticleNohup owned by different user
Hi, I am on Solaris-10. autus01 is the user, which is running a script and redirecting its output to a nohup.out file, but this file is owned by root, even though it is running by autus01 user. I...
View ArticleSplitting delimited string into rows
Hi, I have a requirement that has 50-60 million records that we need to split a delimited string (Delimeter is newline) into rows. Source Date: SerialID UnidID GENRE 100 A11 AAAchar(10)BBB 200 B11...
View ArticleCommand very Slow
Hi, The below command takes more than 2hrs. Code: result=$(find . -name "star_st*" -exec head -1 {} \; | grep "1175 876330") Is there a way I can tweak the command to get better performance / quicker...
View ArticleGrep/print/ a test file
cat abc.txt Code: Filename: SHA_AED_Monthly_SNR_20150331.txt.gz Data Format: ASCII with carriage returns and linefeeds Compression: GZIP GZIP Bytes: 36893068 Unzipped Bytes : 613794510 Records: 851310...
View ArticleReplace C instructions for system calls
Hi! At first I'm new to this forum and I'm not sure if this post is correct in this place. I have a problem trying to change 2 C instructions for system calls. The code that I have is that: Code:...
View ArticleKorn Shell manipulating the string into dynamic currency number
Conversion of string into currency value.. ex1: Code: number_of_positions=2 input_string=345987 Output= 345,987.00 ex2: Code: number_of_positions=4 input_string=1345987 Output= 1,345,987.0000 Please...
View ArticleCan't boot into Graphical mode in CentOS
Hi guys, I am compeletly new in CentOS, so I have really stupid question (I think) I just installed CentOS 7 with KDM and want to boot into graphical mode, but it takes me in command line every time :(...
View Article