trying to use sed command unsuccessfully c:\dct\ is what I want to have replaced with *raw sed -i 's/\c:\dct\/*/raw/g' adm2014.do i think the espace characters are throwing me off.

Member Avatar
Member Avatar
+0 forum 1

Hello DaniWeb / Linux Users and Programmers, I am 90% new to the world of Linux. I was instructed to edit a running program. The purpose of editing this program was to follow the format of the other running program. But it is hard for me to understand because some of the codes have like this: -u , -d , +%-H , -ud , $1 , etc... So I look on the internet but it show the basic commands not the exact meaning for the given example. anyone can tell me the meaning for it? for fast track... and also …

Member Avatar
Member Avatar
+0 forum 5

I am trying to understand one test script, which includes [CODE]if [ ! -f mahout-work/reuters21578.tar.gz ]; then echo "Downloading Reuters-21578" curl http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.tar.gz \ -o mahout-work/reuters21578.tar.gz fi[/CODE] What does the condition of [CODE]! -f mahout-work/reuters21578.tar.gz [/CODE]mean? And what does [CODE]curl http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.tar.gz \ -o mahout-work/reuters21578.tar.gz [/CODE]stand for? Thanks.

Member Avatar
Member Avatar
+0 forum 2

I am writing a simple shell script to automate a simple backup of a website and it's database. This is the working code: [CODE]#!/bin/bash # creates a backup of the mysql & webdata for a specific website. TODAY=`date +%A` # these variables cannot contain any spaces and must be modified based on: # the name of the /automation/folder/ of the application being backed up (application) # on what server (localhost) # where the backed up data should be replicated (remotehost) # the location of the www data for the specific application (webdata) # /var/www/somefolder # the username, password and database …

Member Avatar
Member Avatar
+0 forum 13

what I'm trying is to write program that accepts list of user as its argument 1- If a user or more are given as arguments, the script should reset files permissions as follows: a. Directory ~/share to 750 (if it exists). b. All regular files inside ~/share to 744. c. All directories inside ~/share to 750. d. All other regular files in ~ to 600 and all other directories in ~ to 700. e. files of other types are left as they are. We assume that there is only one level of files and directories inside ~ (except for ~/share), …

Member Avatar
+0 forum 0

Hi, as a bit of background, My Uni have lately implemented a CGI script so you have to log in to be able to use the wireless. This would be OK but they are terrible programmers and instead of timing out after a period of inactivity it will time out after 570 seconds. Again I wouldn't mind this but to re-connect I have to completely disconnect from the wireless, this is just a pain. This problem can be overcome by signing out after a period of time and re-signing in. I have written a basic script so far which uses …

Member Avatar
+0 forum 0

Hello all. With help on forum i've got the ideia of making the script to check if the file was created today and if its so,print its name. Here it is: [CODE] #!/bin/bash for file in *; do filedate= "date -r $file +%Y-%m-%d" currentdate= "date +%Y-%m-%d" if["$filedate" == "$currentdate"]; then echo $file fi done [/CODE] After reading some tuts, it appers to be parcially valid, but i get the next errors : [code] ./script.sh: line 6: syntax error near unexpected token `then' ./script.sh: line 6: ` if["$filedate" == "$currentdate"]; then' [/code] Thanks in advance.

Member Avatar
Member Avatar
+0 forum 4

The End.