1,817 Topics

Member Avatar for
Member Avatar for serkan sendur

1) vi . profile shows alias for commands, you can set the new ones. 2) esc = displays the file and folders in a numbered fashion. 3) esc – or esc k ( esc n does the same thing reversely) shows the previous commands 4) cd esc \ [type something] …

0
53
Member Avatar for AlvinRey70

Can someone please help me with the following questions. 1) Create a script that will produce a text file that has a list of the files in the present working directory. Ensure you use the proper syntax to allow auto-execution from the command prompt. Use internal documentation (comments) to place …

Member Avatar for moqwen
-1
211
Member Avatar for shyamsantra

Hi All, I am trying to compare two folder using "cmp" command. Folder1=/path/to/folder1 Folder2=/path/to/folder2 Folder1 has file name abc.txt efg.txt hij.txt . . . ..................... xyz.txt Folder2 has file name abc.txt efg.txt . . . ..................... xyz.txt I want to compare this two folder with similar name. Means Folder1/abc.txt should …

Member Avatar for eggi
0
80
Member Avatar for jinsonsani

I want to replace a text in a file eg (old_text) with another text eg (new_text) . new_text is a variable in my shell script. few methods that i tried .. but this doesnt work cat $line".sh" sed -e 's/abc/ABC/g' $line".sh" sed 's/ordprg/new_string/g' $line".sh" > $line".sh" Could some one can …

Member Avatar for eggi
0
165
Member Avatar for mustaine85

Hi, how do you append to a variable? I can only get it to work with a seperate file like this: printf $number1 >> sum.txt I tried this : $number1 >> $sum but it says $sum: ambiguous redirect, any ideas? :)

Member Avatar for eggi
0
87
Member Avatar for mustaine85

Can I use my own variables within awk and sed for example: I've written a while loop with a counter $i and I want to use the value of $i within sed and awk to edit certain lines of text within a data file. I want to use : sed …

Member Avatar for mustaine85
0
88
Member Avatar for shouvik.d

Hi There, I have a third party EXE file (on which I have no control of any modification) which invokes a new CMD window in order to execute itself. In other words it a windows console application. Now it executes with some switches for runtime options [ICODE]<exe_name> /opt1 "param" /op2[/ICODE] …

Member Avatar for Fest3er
0
570
Member Avatar for Blackeagle

hello, i'm new with scripts and linux and need a little help. i made a text file called colors using a vi editor and contains as follows: red green blue gold now i want to delete the 2nd line with the word green using a script file. well i know …

Member Avatar for Salem
0
120
Member Avatar for mustaine85

Hi I have a simple question. Is there an easy way read a date of birth from a file and calculate how old that person is based on today's date? And would I need the make sure the birthdates are enterered in a particular format?

Member Avatar for eggi
0
78
Member Avatar for wmuldoon

hello all, I work at a newspaper, and we use QuarkXPress for Desktop publishing...and we have a pretty unfortunate glitch, when Quark crashes, it seems to untick the backup option in the pref's... so I was thinking this would be a good place for a small recursive script, that would …

Member Avatar for wmuldoon
0
241
Member Avatar for serkan sendur

hi all, i want to associate some files with some programs like we do in windows platform. for example on the shell prompt if i type a file name(i am in that directory) i want it to be opened by gvim editor. how can i do that?

Member Avatar for eggi
0
198
Member Avatar for rhesus303

I'm learning some shell scripting but came across this line: [icode] link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` [/icode] Where [icode]ls=$0[/icode] Can someone explain it to me pls?

Member Avatar for eggi
0
226
Member Avatar for jagr200

hey all. Im writing a small script that is supposed to check for a file or directory and when its not there create it. After it creates the file or directory I would like the script to loop to the beginning but I cant figure it out. What am I …

Member Avatar for Fest3er
0
93
Member Avatar for confusedGirl

[COLOR="red"][COLOR="red"]Hi all[/COLOR][/COLOR] [COLOR="Red"]I write to ask you if you could help me with writting this script>>[/COLOR] Suppose we have 2 files: x and y In x, we have those lines: g0201350 g0233234 football United Arab Emirates University College of Information Technology g0209099 In y, we have those lines: Hello there! …

Member Avatar for eggi
0
115
Member Avatar for samantha grace

hi, i am a newbie and have to write a rather complicated script. Assume that i have a variable called x and a C source code file say file1.c (this are the inputs of the script) and i need to find the names of all the functions in the C …

Member Avatar for samantha grace
0
225
Member Avatar for shouvik.d

Hi, I am using a scheduled task that runs every night to take backup of important files. This task creates a folder in the following format Backup_DD_MM_YY where DD_MM_YY denotes the date when the backup was taken. Now everytime this scheduler runs I need to remove the older directory and …

Member Avatar for eggi
0
330
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
184
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
159
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
137
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
199
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
85
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
178
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
497
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
264
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

The End.