1,891 Topics

Member Avatar for
Member Avatar for baudday

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 …

Member Avatar for fpmurphy
0
185
Member Avatar for Pender

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 …

Member Avatar for eggi
0
160
Member Avatar for chris5126

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 …

Member Avatar for Fest3er
0
134
Member Avatar for rusman

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 …

Member Avatar for eggi
0
4K
Member Avatar for DimaYasny

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 …

Member Avatar for DimaYasny
0
139
Member Avatar for krammer

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 = …

Member Avatar for eggi
0
201
Member Avatar for gps1234

I am going to write scripts to test IPV6 (RFC 3542); Anybody suggest me how can I start with this ?

Member Avatar for ithelp
0
86
Member Avatar for learnpro

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 …

Member Avatar for eggi
0
179
Member Avatar for Trekker182

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 …

Member Avatar for omrsafetyo
0
508
Member Avatar for carson myers

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 …

Member Avatar for carson myers
0
265
Member Avatar for cristi2008
Member Avatar for cristi2008
Member Avatar for eggi
0
106
Member Avatar for cristi2008
Member Avatar for eggi
0
100
Member Avatar for Trekker182

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 …

Member Avatar for eggi
0
160
Member Avatar for littlestone

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!

Member Avatar for eggi
0
141
Member Avatar for krm142

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 …

Member Avatar for krm142
0
239
Member Avatar for AcidG3rm5

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 …

Member Avatar for Salem
0
119
Member Avatar for wmuldoon

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] …

Member Avatar for wmuldoon
0
97
Member Avatar for Mujzeptu

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 …

Member Avatar for JeoSaurus
0
151
Member Avatar for curto21

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 …

Member Avatar for DimaYasny
0
100
Member Avatar for EdTheUniqueGeek

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? …

Member Avatar for eggi
0
191
Member Avatar for c7borg

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 …

Member Avatar for bugmenot
0
113
Member Avatar for hjast

[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?

Member Avatar for eggi
0
79
Member Avatar for hardeepsp

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 …

Member Avatar for eggi
0
85
Member Avatar for rockX

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 …

Member Avatar for eggi
0
114
Member Avatar for Trekker182

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 …

Member Avatar for eggi
0
217
Member Avatar for axn

[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 …

Member Avatar for JeoSaurus
0
143
Member Avatar for vaibav_vv

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 …

Member Avatar for chris5126
0
119
Member Avatar for Nashy

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 …

0
59
Member Avatar for maurices5000

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.

0
63

The End.