1,892 Topics
![]() | |
HI I would likt to create input files for testing, format is like this INPUT Format DISP NUM BYTES Desc 0 4 CODE 4 10 EMP NO 14 3 AGE 17 1 SEX which will be used for creating flat files ( data in excel file). OUTPUT file should be … | |
Hi, I need some information regarding the APIs to use, to get the drive letter, if I know the label of that drive. For eg, my hard disk has been partitioned into 3 drives, C:, D:, E:. The labels (label1, label2, label3 )for these drives have been assigned dynamically. I … | |
In my script I need to increment a real variable in a loop, which outputs its value to a file. I donno how to do this. Can any one help me in this regard? Thanks | |
#I'm quite new to scripting and my boss has asked me to solve a simple problem and sadly, I can't figure out how to do it. Any help is appreciated very much. #The following is a small shell script and the output that it produces for google.com. #!/bin/sh whois $1 … | |
I have an output in one format that I need to basically read line by line and reformat into another file. I was originally going to try do this in Java, but Java does not have a lot of good classes for text processing. Here is an example of my … | |
I need script for pinging the machines in subnet make list of alive hosts with there OS version redirected in a file. I am from System admin field and not aware of scripting and also beginner of UNIX. Thanks in advance. | |
I am studing c shell and I want to know how to wirte code please, if there is one has it can he send it on my email ? | |
I have a Linux web server that will have a flash form to process user information. This creates a text file in a directory outside of the public area using the date and time for the filename. What I need is this, whenever a file is created in that directory … | |
I need a shell script to simultaneously run multiple instances of a compiled c code can some one please help i'm using BASH | |
#!/bin/bash # Bash script that will produce a text file that has a list of the files in the present working directory cd /bin ls -d ls -d >>file.txt #!/bin/bash #Bash script that will copy all the files in one directory to another directory ls -d mkdir /EgorDir cp*.*ls-d /EgorDir … | |
Hi Guys, I managed to patch together some code but now im a little stuck with getting through the rest of it, i want be able to use a script to start, stop, restart and update a cs server, under niether is what i have so far, to update the … | |
ive been reading up tutorials from this website. but i don really understand how to do this to my program. ive a filename name passwordFile. and my program that i wrote using shell script can see online current users. but ive no idea how to read it into a file. … | |
Below script works perfectly fine from command line, but when I run through browser I am not getting anything inside my $dt. Because of this its always going inside failure scenario. My procedure is going to return either Success / Failed output. Can anybody tell me where I am messing … | |
Hey Folks. I have to write a script that will basically take input from 3 different files which contain the following: product (file contains the following - FS=".") -product ID (Int number) -description (alphanumeric text) -price (floating pt. number, with 2 sig. digits) sales (file contains the following - FS=",") … | |
Hi all; I'm stuck with this simple awk script,i need to group the lines which the position of 28 length 3 (if the line not starts with 0)that contains "688" into 1 group and other than "688" into another group. My problem is the script only read other than "688" … | |
Hi Guys I have created a script and everything works but i want my script to sort by the highest count etc. The script counts the amount of times a job fails , for example the output looks like this: u08.joebloggs.ndm has failed 1 times u09joeblogs.rpt has failed 5 times … | |
Hi all, I am writing a script which parses /* to find out the commented portion of the code. I am using grep "/\*" file.c Following is the code snippet for i in `grep "/\*" file.c`; do . . . done but this is not giving the lines greped from … | |
Hi All, My query is related to assinging a variable with value which is there in the env. Suppose from my c++ code i am doing putenv("A=abc"), now wat i want to do is to get this value of A in my shell script and assisng this "abc" to my … | |
Dear all, cut -c 4-8 , this will cut the character from 4 to 8 and give the output but suppose I want output excluding character 4-8 then how can I do with cut command Thanks in adavance Vinod | |
Hello I am new to Unix. Please help me out. My Scenario: I am first collecting all the file names present in the directory with structure myinfo/yourinfo/supplierinfo I have four files with the names myCollector.java, yourCollector.java, someCollector.java, everyCollector.java. in the directory. I am reading the file name and i am … | |
hi hope u guys are well... i am using a linux command (with system() call in my c++ code) to search all files with in the system and then store the results in the a file(say filename). i am piping this with tail --f filename to display the results while … | |
Hello All, I could use some help, I am trying to write a small script for my mythTV dvr but I am in over my head (I am new to bash scripting), I am trying to run "ls -tr *.avi | tail -10" to get a list of the last … | |
Dear friends , file is test.sh [CODE] echo expr 2+4; [/CODE] its give result 2+4 not 6 so plz tell how can i get the right result sanjay | |
Hi all,i am very new to shell and awk scripting,..hope u guys can help... I need help in sorting and grouping the data in one flat file.The file look like this: 040171011140820070000000009650244002933170003000000075272 1F921338300506 01082007000014000000027665 1H912279980109 01082007000012000000042420 1S503377200110 01082007000014000000005187 1S503377200110 01082007000688000000005188 3SF98 I need to rearrange the file to become like … | |
i've obtained alot of literature for vim editor and i've started working, but then i realised there aren't any books on shell scripting (at least i could'nt find any) containing many examples. can anyone suggest a good by example book on bash shell? also, what is the importance of scripts … | |
Hello all, I need to write a script that will act upon output formatted like the following example: [B]afp:state = "RUNNING" afp:usersArray:_array_index:0:disconnectID = 0 afp:usersArray:_array_index:0:sessionID = 3423 afp:usersArray:_array_index:0:minsToDisconnect = 0 afp:usersArray:_array_index:0:flags = 0 afp:usersArray:_array_index:0:state = 6 afp:usersArray:_array_index:0:loginElapsedTime = 89731 afp:usersArray:_array_index:0:name = "maryallen" afp:usersArray:_array_index:0:lastUseElapsedTime = 89725 afp:usersArray:_array_index:0:serviceType = "afp" afp:usersArray:_array_index:0:sessionType = … | |
Hello, I need to figure out the sizes of different data types in a bash script. I haven't been able to make it work with sizeof(), is there an alternative ? Thanks a lot. | |
hi, can anyone give me idea how to do this please as i am new to shell scripting write a shell script(varcount) that takes a c++ program and counts the number of words which could be a valid c++ variablename. thanks for the help in advance | |
Ok, my name is Paul and i am new to this forum. I need some help and thought i can try my luck here. I need to write a program to do the following: 1. Need to write a shell script called fileutils.sh that will do: Accept one variable on … | |
I want to get out put as folows: [code] 100 HE01 {number of line in this file} {file created on time stamp} 200 LTXS {number of line in this file} {file created on time stamp} (if the file does not exist then it should say FILE NOT AVAILABLE [/code] to … | |
Hello guys, I have tried unsuccessfully the following problem with sed and awk grep commands: [B]- Try to find a specific word in a text file, and when you find it, [B]add [/B]after that word the number of occurrence of that word, but leave the first match unchanged, i.e. no … | |
Hi, I have a script which uploads files successfully to another server via ftp. But after the files are uploaded, I want them to be deleted (removed), but it doesn't seem to work. I would appreciate if someone could help me out with this. How can I modify my script … | |
i'm an absolute beginner in shell scripting so i need adivice: what is the best editor, and where is the best place to find tutorials for them? i'm a somewhat experienced in c++ so i understand the shell code quite quickly but i'm having truble writing it in vi because … | |
Hi can anybody help me in understanding this sed -e "1,/^%!ab-cdef$$/d;s/\.#@%&\*)/\)/g" > file.txt Naveen | |
hi, can i just know how to use fastmail in a shell script to send mail to a group.. i know wat all arguments to use.. its like.. fastmail args file address.. but m not able to send mail.. please help me out.. | |
Hi my family computer needs a backup script... it needs to do the following tasks for us.. The script will ask the user which directory they wish to backup? the backup will 'ask' the user for the full pathname of the backup to create also i need the script to … | |
why doesn't /usr/bin/time command return maximum resident set size (instead it returns always 0) and how to measure it then? Thx | |
consider two methods in a script as below, do_a() { spool $file1 select column1 from table1; } do_b() { spool $file2 select column1 from table2 where column2='xxxxx' } The first method returns just one value say 10001,I have to use this result in the second method in place xxxxx. I … | |
Hello, I have a script I've used on pre-Solaris 10 that works just great. Now on a Sol10 box, it is bailing on this line with this error: syntax error at line 27: `|' unexpected Here's the 'offending' line: [code]creation=`echo $backupid | sed 's/^.*_//'`[/code] I'm a bit confused as to … | |
Given a grid of integers size n x m, (use n=100 and m=4 to test it), write a C program that can create 4 (m) children where each will compute the sum of row m (size n). Then, the waiting parent, once all children has computed their respective sums, it … | |
Hi My problem is that i need to measure given command statistics (time, mem, etc) with shell script My script must basically do two things: 1. Measure overall command statistics (it is total time, maximum memory use during runtime, etc) 2. Measure command statistics in given periods of time during … | |
Please pardon the simplicity of this question, I kind of got thrown into these responsibilities at the last minute without training. I I need to move a file called status10.dat to a different directory using korn scripting. [code = korn] cp status10.dat* /cerner/d_p19/ccluserdir [/code] I only want to do this … | |
Hi, Is it possible to call the constructur of a java class from a shell script? I know you can call static methods, but can you also call the constructor? Wim. | |
Dear all, I have written a small script which will send me mail on status of server. I have tested it working fine. I am facing only with message subject The last part of my script is as below, cat dailystatus.txt| mail -s "Daily Server Status Report-$yr-$mm-$dd" [email]root@ecms.co.in[/email] The script … | |
Hi all, a=2007-05-10 b=2007-06-10 These are the two given dates and I need to compare. The script should first compare years.If both are same or if a is lesser than b,it should print correct.If a is greater than b,then it should print error.Similarly for the dates(05 and 06). No need … | |
This is my first time writing a bash script in Linux, basically I want to create a user but not use adduser or useradd. So, in the /etc/passwd folder I need to put data in, in this way. login:encrypted passwd:UID:GID:gecos:home directory:login shell I'm going to leave the gecos blank. Then … | |
Hi, I want to create a script that can be run daily(as cron job?) and which does the following: 1) Queries a MySQL database to return details of registered users. 2) For each user, compares their expiry date with today's date and if the remaining period is either 30,14,7,3,2 or … | |
I'm unsure if this is exclusively a unix/linux scripting forum but I need help writing a windows script (I'm more of a perl/unix scripter). I need to be able to periodically clean out the user profiles on a presentation PC in a conference room. Therefore I need a script which … | |
Hi everybody: I have a problem :?:, I would like to paste different files which has this pattern name: namefile_number.dat like this: namefile_1.dat namefile_2.dat .... And I have tried to use paste command, for create a name_final.dat. But such I have done: [CODE] paste namefile_*.dat > name_final.dat [/CODE] It works … | |
I tried to Sends email but somehow email not getting out, please help me how I can write shell script in right manner. Thanks and regards This is the one I tried my end. Script: #!/bin/sh set wma = `grep -i "java" sampletest` echo $wma mail -v -s "ALERT" [email]tamilmercy@yahoo.com[/email] … |
The End.