1,817 Topics

Member Avatar for
Member Avatar for aFg3

I want to create a simple file....with the command Example: [CODE]touch file.txt[/CODE] ok its created *BUT* ****I want to edit this file in shell and save it, writing EOF to finish. Any suggestions? How i do that? Thanks!

Member Avatar for JeoSaurus
0
63
Member Avatar for coding101

Is there some sort of script I can write that logs usernames every time someone (other than owner) "cd's into my pub directory"? any ideas? thanks

Member Avatar for thekashyap
0
148
Member Avatar for anna12

hey all, im new at shell scripting and need to find out a simple way to create text files, with random words in them. then needing to input 3 of these files arranging their lines in alphabetical order and after that creating an output file with the last lines sorted …

Member Avatar for eryxzs
1
11K
Member Avatar for D33wakar

Alright, here's the deal.There's a folder with Jpg images and I want to open each JPG image in that folder, rotate it clockwise once and save it with the same name in the same folder. How do I do that with batch programming? We Can't use "Windows Picture and Fax …

Member Avatar for D33wakar
0
129
Member Avatar for deni_bg

Hi, everybody! I have a big problem. I don't understand Unix, but I work as a system administrator, and sometimes I make some data exports and I have to delete old .dmp files, but today I had a mistake, I wrote rm * 909* This is a part of my …

Member Avatar for L7Sqr
0
158
Member Avatar for Staric

A friend of mine made this script to backup files from all my ubuntu boxes using lftp to an ftp server i setup on my local windows 7 machine using apache and abilityftp server. However it is only backing up some config files(see attached screen), none of the actual directories …

Member Avatar for JeoSaurus
0
217
Member Avatar for voidyman

Hi, I want to ftp a file to a location and then kickstart a process there to work on the file. I tried using !rexec but it does not seem to be working too well. I am not using the .netrc file(if that helps you understand my problems better) Thanks …

Member Avatar for voidyman
0
100
Member Avatar for Sudo Bash

Hi, I was wanting to write a (ba)sh script to allow me to wait for the detection of a new USB device, and when that device is detected, execute some commands. The scripts are intending to be working on the principle that whenever I plug in a usb device a …

Member Avatar for Sudo Bash
0
242
Member Avatar for Digitalwolf

I attempted to make a shell script to launch a java program packaged into a .jar file. It should have been pretty simple. [CODE] #!/bin/sh java -jar Test.jar [/CODE] but for some reason this script never runs. i've manually executed the command and it works perfectly, i've checked the path …

Member Avatar for Digitalwolf
0
193
Member Avatar for jiapei100

Asking for a Linux command line to convert all files in current folder from UTF8 to ANSI, name unchanged. Best Regards Pei

Member Avatar for griswolf
0
278
Member Avatar for Borzoi

I currently have a small script I've written that basically takes an incremental backup of a folder which looks similar to this: [code] #!/bin/bash cp -ruf /home/folder4/subfolder/ /home/folder5/ cp -ruf /home/folder3/subfolder/ /home/folder4/ cp -ruf /home/folder2/subfolder/ /home/folder3/ cp -ruf /home/folder1/subfolder/ /home/folder2/ [/code] Now this runs fine, only updating the files that …

Member Avatar for JeoSaurus
0
207
Member Avatar for maninaction

I have a perl application.In one of the low level scripts, it's possible that it must "logout" the user.Basically, exit the shell that this application is running. Are there Any ideas on how to accomplish this?

Member Avatar for rch1231
0
127
Member Avatar for earlybirdsean

What programming language is fit for shell scripting? And could you add a sample code of a shell?

Member Avatar for cfajohnson
0
192
Member Avatar for k2k

Im trying to scp including password in one line... seems not working. [code] echo "pass" | scp --stdin source destination [/code] However this does work though [code]echo "newpass" | passwd --stdin user [/code] same concept, diff result. Any suggestion would be great. Thanks

Member Avatar for maninaction
0
535
Member Avatar for k2k

Sometimes it is hard to locate the exact line you want to modify if there are so many lines having the exact same codes/text. example: #this is x a=0 #this is y #this is yy a=0 this is z a=0 My question is, is it possible to find something unique, …

Member Avatar for k2k
0
126
Member Avatar for Satyrn

I wrote this small script to convert all sh files in a directory and all sub-directories to resolve a compilation error I was getting with cygwin... [CODE] SETLOCAL @echo off :: Locate all sh files in the target directory and then :: Convert CRLF to Unix Style LF echo Converting …

0
69
Member Avatar for Member24

Hi, I recently started working using awk. I am facing a problem to traverse a file row by row. I have a file test.txt which has 2 fields filename and action. test.txt -------- /tmp/a.txt|Action1 /tmp/b.txt|Action2 /tmp/c.txt|Action3 I need to check for the existence of file ($1) in the above file, …

Member Avatar for JeoSaurus
0
242
Member Avatar for etm9413

Hi all, this is a quite simple question. In windows, I wan't to set an environment variable to contain a cmd prompt command that will open an explorer window from the command prompt current directory. I am aware of the >explorer <path> command and want to make use of the …

Member Avatar for Aia
0
186
Member Avatar for mkbuster

I need to sum up the values of 3rd column and 4th coulmn based on the following conditions 1) If the 1st column (i.e ctpy) of the record matches with any other record && first two character of the 2nd column (ety), matches with first two character matches the 2nd …

Member Avatar for mkbuster
0
464
Member Avatar for boshu

Hi There I am building some SW modules in Linux environment and at the end of a build the artifacts are stored in the env in a particular folder called HW. This HW folder contains a number of folders underneath for individual targets and those contains one or more folders …

Member Avatar for boshu
0
127
Member Avatar for kristo5747

Why does this work [CODE] for myfile in `find . -name "R*VER" -mtime +1` do SHELLVAR=`grep ^err $myfile || echo "No error"` ECHO $SHELLVAR done[/CODE] and outputs [CODE] No error err ->BIST Login Fail 3922 err No error err ->IR Remote Key 1 3310 err [/CODE] But this does not …

Member Avatar for Fest3er
0
234
Member Avatar for Pityu

Hey there everyone! I have an issue with a script with which I had sweated much, and I can't suspend it even if I find another solution for what I want. What I want would be the following: A script that creates a full backup of a directory and all …

Member Avatar for Fest3er
0
222
Member Avatar for neely615

First, I apologize for posting this since it seems to have been addressed for every situation except mine (or so I can find), and I admit I am a complete novice. [B]Intro:[/B] I have a batch file which gets placed in a directory with target files, loops through the files …

Member Avatar for griswolf
0
327
Member Avatar for scriptingnoob

Hi all, As the name suggests, sriptingnoob by name scriptingnoob by nature! I really need some advice, as I am loosing what little hair I have left. I have a file which contains lines similar to these MACHINE[1]=192.168.10.1 HOSTNAME[1]=MACHINE1 LOCATION[1]=UPSTAIRS MACHINE[2]=192.168.20.2 HOSTNAME[2]=SAGE LOCATION[2]=UPSTAIRS PRINTER[3]=192.168.10.56 etc I want to write a …

Member Avatar for L7Sqr
0
109
Member Avatar for juan77

Hello everyone I have the following code. bat and I would like to convert it. sh, someone could help me? Thank you. [CODE]1) for /F "eol=#" %%i in (%wade-cfg%/boot.properties) do ( set %%i ) 2) for %%F in (%lib%/*.jar) do ( set class-path=!class-path!%lib%/%%~nxF; ) 3) for /f "tokens=*" %%G in …

Member Avatar for griswolf
0
116
Member Avatar for tmparisi

This will be on an automated FTP scheduler... Here is the 1 step I am trying to accomplish: 1. Upon connection to server, the script should: delete all files within the folder '/backup'. That's it... any ideas?

Member Avatar for JeoSaurus
0
31
Member Avatar for braintwister17

Hi Everyone , I am currently learning shell scripting.So I just need little help from you. If you know sites which have good shell programs / questions for practice (solving ) .. please post them here. If you can provide any alternative regarding my study on shell scripting that would …

Member Avatar for IIM
0
138
Member Avatar for stroganoff23

Hi , how can I use the at command to find me in a specific point of time upon logging in? which it will display on screen a txt file at the same time. Thanks in advance

Member Avatar for IIM
0
96
Member Avatar for emanfman

Well, well. I was looking for a program online. And so, it appeared as a [ICODE].bat[/ICODE] file. However, It looked suspiciously small at 53 kB. So, before I ran it, I opened it up in notepad and voila, a virus. So, I shredded the file with the windows 7 shredder, …

Member Avatar for sknake
0
143
Member Avatar for SakuraPink

Hi everyone, I have a text file which looks like this: [CODE] ( 3,3,0 ) 0.9984104 0.000503 ( 3,3,1 ) 1.000613 0.000484 ( 3,3,2 ) 1.001192 0.000571 ( 3,3,3 ) 1.002418 0.00063 ( 3,3,4 ) 1.003345 0.000583 ( 3,3,5 ) 1.000215 0.000512 ( 3,3,6 ) 1.000911 0.000537 ( 3,3,7 ) …

Member Avatar for Aia
0
197

The End.