1,891 Topics
| |
Hi, I've been looking all over, and I can't seem to figure this out. I have to generate a random number within the range of -99 and 99. I know about RANDOM, but I don't know how I could use that to keep the numbers within this range. Any help … | |
hi, i hope someone can help here with my problem. i have a file with this structure: testtt Login-Lat-Group = CNAme Auth-Type = whatever testt Login-Lat-Group = CName Auth-Type = whatever test Login-Lat-Group = CName Auth-Type = whatever i need now a command (e.g. awk or sed) which deletes the … | |
Hi guys, Will keep this short and sweet. Trying to do integer devision to *decimial places but i dont think the version of ksh installed on solaris 10 supports this as they would need to be declared as floats. Is this correct? If there isnt a way of doing it … | |
I need to read in a list from a file, but I want to always ignore/skip the first line of this file. Right now I'm just cat'ing the file and awk'ing the first column as that's all I need. However, this will also give me the first column of the … | |
Hi, I am looping through some files, gathering information into an array during that loop. The array grows with the loop counter and at every point might be longer or shorter (more or less members in it) so in order to reuse the array I need to drop all values … | |
Does anyone know why this script would give me an error (only sometimes) with it saying "too many arguments"? [CODE]#!/bin/bash HOME='/home/eric' arrFiles=("$HOME/.kde/share/apps/kaffeine/playlists/NEW.kaffeine"\ "$HOME/.kde/share/apps/kcookiejar/cookies"\ "$HOME/.kde4/share/apps/kcookiejar/cookies") arrDirs=("$HOME/.kde4/share/apps/RecentDocuments/*"\ "$HOME/.kde/share/apps/RecentDocuments/*"\ "$HOME/.macromedia/Flash_Player/#SharedObjects/*") case "$1" in trash) rm -r $HOME/.local/share/Trash/* echo Trash emptied ;; history) #Clears Files for x in "${arrFiles[@]}"; do if [ $x = … | |
I am going to write scripts to test IPV6 (RFC 3542); Anybody suggest me how can I start with this ? | |
Hello Everyone, I am a total beginner in UNIX/Shell script. I am in the process of creating a huge script for a spellchecker program. What it does is spellcheck files and throws output in a temporary file. What I need help in is forming a [B]for loop [/B]where it will … | |
I'm reading up on jobs and processes in UNIX and was a little confused. A processes is just something that executes and then dies right away, like a grep command issued from the shell, right? It started, did what it was supposed too, outputs the info and then dies so … | |
Wasn't sure where else I was supposed to put this but I recently installed VMware and a copy of MS-DOS 6.22 using .img files mounted to a virtual drive in the virtual machine. I have a couple questions... 1. there is no "shutdown" command in this version of DOS, is … | |
| how can I limit the length of a variable??thanks |
| hy! How can I do so that my input to be a file.To read a file as input.thanks |
| hy! I would like to know how can i ckeck the input if its a number or if its a text? |
I'm a little confused on umasking. The way I was shown to do it manually is to take whatever number the umask is, say 123, turn that into binary for the permissions. 001010011 flip the bits 110101100 and then take away executability 110100100 thus I get rw-r--r-- but when I … | |
Some of my source files include the following code. [code] #ifndef AAAAAAAAAAAA #define AAAAAAAAAAAA #if !defined(__lint) && !defined(_lint) XXXXXXXXXXXXXXXXXXXXXXXXX; #endif #endif [/code] I want to delete line1, 2, 6. So, Could somebody tell me how to do it? thank you in advance! | |
Hi frnds.. Need help in writing a small script... I have the following text file... 1)PPI2MSNK I5 P50 2) PIAIS Major 3)PPI2MSNK I5 P51 4) PILOS Major 5)PPI2MSNK I5 P57 6) PIAIS Major 7)PPI2MSNK I7 P57 8) PIAIS Major I want the script to join the line 1-2 , 3-4 … | |
I have the following information in the text file: 1:boot 2:book 3:booze 4:machine 5:boots 6:bungie 7:bark 8:aardvark 9:broken$tuff 10:robots 11:rebine when i did a grep -n "b*" a_file.txt, it returned 1:boot 2:book 3:booze 4:machine 5:boots 6:bungie 7:bark 8:aardvark 9:broken$tuff 10:robots 11:rebine I thought it would match the letter b followed … | |
I'm currently trying to write a shell script at work that would loop and allow me to enter the date, and the ad number of a PDF file, that would then copy that ad into a designated file and I can't get it to run correctly heres the code: [code] … | |
As the title suggests, I am wanting to create a simple script for system administrators. When you run this script in a linux shell, it will ask you what you want to set the local systems hostname to (so the admin can type it) and then prompt the administrator for … | |
I need help trying to execute a script remotely using ssh. I'm writing a script that will run on a local machine. From that script I need to execute a script on a remote machine. The problem is that when I run the remote script using ssh, it's output is … | |
I'm still learning Linux, and have been for the past 7 years, but am still rusty on scripting. Can someone tell me if it is possible to create a script that will change the DNS IP address of your interface from dynamic (from DHCP) to a specific static IP address? … | |
Hi guys, I'm looking to start scripting and have a problem I thought I would use to learn some basics, basically I have a list of my family's addresses that are in one big vertical list varying in size. I want to sort into a tabular format below is a … | |
[code]for (( i = 1 ; i <= 10; i++ )) do #J = 100 echo `expr 1000 * $i` #java SortTester $num >> data.txt done [/code] This is not working why? | |
Develop a program on UNIX only that accepts run-time arguments and outputs the number of command-line arguments given when the program is executed echoes any command-line arguments containing the letter z echoes any command-line arguments that start with test echoes any command-line arguments that end with .doc Please help me … | |
Hey i have another query . I am trying to add all odd and even columns of the percentages calculated and adding them as columns to the left of the percentages. so in the above percenages calculated totoal odd would be `($1+$3....= 45.83+51.61...)` same thing for even as well o … | |
I just used mkdir myDir{1,2,3} to create 3 directories called myDir1, myDir2 and myDir3 in the same root directory. Now I'm trying to create 5 subdirectories in each by using mkdir ~/myDir*/subDir{1,2,3,4,5} but it's giving me a file already exists message. When I do an ls on the root directory … | |
[ICODE]trying to diff new files in a dir cd ${PWD} for line in $(ls *.new) do # lists all new files and then 2nd variable strips the .new extension of the files echo ${line} ${line} | sed 's/\(.*\)..../\1/' diff ${line} ${line} | sed 's/\(.*\)..../\1/' # this doesnt seem to work … | |
Hi I am a newbie in shell scripting ... I can honestly say, I am just learning to write shell scripts .. But, I am in need for a script which does the following: There is a file which has the contents as follows: date time contents date time contents … | |
Hello people! I have an homework to compile the fax2tiff program. It will be no problem, but how to try my program, if it work? Because I haven't fax file at home, bec. i haven't fax device. I was searching for long time to find some examples for fax files … | |
I thought you guys had an article about WinBatch on this page below. [url]http://www.daniweb.com/forums/member28964.html[/url] Is says what does this community think of WinBatch? or something like that. But i don't see any information on this forum about WinBatch. |
The End.