1,891 Topics

Member Avatar for
Member Avatar for shroomiin

Hello everybody. I am attempting to write a simple script using a for loop that counts the number of directories, the number of simple files. and the number of symbolic links in the current directory, and then prints this information. The output should look something like... directories: 12 files: 20 …

Member Avatar for thekashyap
0
164
Member Avatar for lu2lu

Hi I wrote a script for class that took one specific file as an input. Ideally, it should be able to take any file as an input. How do I do that? Someone suggested using $@ since is a global variable but I'm kinda confused on how to implement it. …

Member Avatar for lu2lu
0
165
Member Avatar for coding101

I have a directory with a bunch of stuff in it. when you say rm -r "the directory" you have to say yes,yes,yes,......20 times. Is there a script for just having the answer to all "are you sure you want to delete ...?" be yes? any scripting help, im new.

Member Avatar for masijade
0
199
Member Avatar for konefsta

im reading a character given by the user through the keyboard . now ,what is correct : if ($gramma == s) then OR if ($gramma == 's') then where s is supposed to be the character given by the user . if its not any of that whats the correct …

Member Avatar for thekashyap
0
118
Member Avatar for raigs

[CODE]myuser@linux:~/Desktop$ gcc -nostdlib -Wl,-dynamic-linker,/home/myuser/Desktop/ld-linux-x86-64.so.2,-rpath,/home/myuser/Desktop libc.so.6 libgcc_s.so.1 simple.c myuser@linux:~/Desktop$ ldd a.out linux-vdso.so.1 => (0x00007fffbf5ff000) libc.so.6 => /home/myuser/Desktop/libc.so.6 (0x00007f308b7ae000) libgcc_s.so.1 => /home/myuser/Desktop/libgcc_s.so.1 (0x00007f308b598000) /home/myuser/Desktop/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f308bb11000) myuser@linux:~/Desktop$ [/CODE] Which ld is being used, the one on the Desktop or the one in /lib64 ? What options do I have to use …

0
108
Member Avatar for alwaz on9

Hi all, I was asked to write a shell program in c in unix....basically what i would like to include are the use of dup2 to implement redirection ( < or >) and the use of dup2() and the pipe() system call to implement the '|' symbol on the command …

0
165
Member Avatar for kshitij tyagi

Hi.. I am a total newbie to writing scripts. I am trying to execute a program through a script, but I keep getting 'unexpected end of file' error. [ICODE] q=1.170 while [ $q -lt 1.405 ]; do ./a.out $q q = $(($q + 0.005)) done [/ICODE] Please tell me the …

Member Avatar for kshitij tyagi
0
167
Member Avatar for rithish

hello i know only shell use but i dont know to program and where to program iam very interested to study about that please show me some links or books where i have to start .iam a absolute beginner please guide me

Member Avatar for rch1231
0
45
Member Avatar for xxyuri

script to specify the name of the user to be checked, the frequency in seconds at which the script should check. If a checking frequency is not specified, it should default to 60 seconds So far I have got [CODE] frequency=$0 user=$1 #!/bin/sh while [ $* -gt 60 ] do …

Member Avatar for xxyuri
0
206
Member Avatar for rhuffman8

I am working on a project using HTML, PHP, and LINUX shell commands to create a dynamic web page but I seem to be having some trouble figuring out how to run the .cgi file with the shell commands in it using either HTML or PHP (if they are both …

0
120
Member Avatar for jaango123

Hi All, The command is perfectly working in a Linux machine, but getting a filecopy failed error in windows machine. copy scp://user@ipaddress/sourcefile loca:///destination I guess we have to specify the domain name also in the windows server, as the username is domain/user. Please help. Any other option other than scp.

Member Avatar for jaango123
0
124
Member Avatar for SakuraPink

Hi everyone, Here is my problem: I have different data files each with several columns and row of data. datafile1 , datafile2, ... Now I need to do some simple math procedure of this data files, Lets say I need to add the 3rd column of datafile1 to the 2nd …

Member Avatar for chaosless
0
152
Member Avatar for mkab

Hello everyone. Let's say i have 2 scripts called "fill_cup.sh" and "empty_cup.sh" and i create a 3rd script "cup.sh". How can i run/execute the scripts "fill_cup.sh" and "empty_cup.sh" in the script "cup.sh". I tried with sh fill_cup.sh and ./fill_cup.sh but it doesn't work. for example Script cup.sh #!/bin/sh [CODE]echo enter …

Member Avatar for SakuraPink
0
242
Member Avatar for k2k

Does anyone know how to use awk to print every 3rd line from the 1st line and including the 1st line? 1st .. 3rd .. .. 3rd .. .. 3rd soemthing like this? the closest I could get was below, but it dosn't go beyond the 3rd line.. any ideas? …

Member Avatar for griswolf
0
77
Member Avatar for Kiraichi

me and my team working on a project called Stealth Hunter, Summarize about our project: Stealth Hunter is a thief catcher, It will silently take a snapshot of user using a stolen notebook or pc with webcam and send the information via email. how it work is: The scripts will …

Member Avatar for masijade
0
214
Member Avatar for aditya027

Hi, How good is the TCL scripting language? Is it a hot trend in market? What are the jobs prospectus after learning this language?

Member Avatar for masijade
0
53
Member Avatar for tony75

Hi I have a folder and its contain 5 text files. My question is How can I navigate to folder and read two first line of the txt files in folder with python scripts? I will be very greatful for your help. Reagards Tony

Member Avatar for TrustyTony
0
267
Member Avatar for Straocaste

Hello, I need help making my shell in c. The shell needs to ignore spaces, this means that you can put the spaces you want an the command needs to work, I already resolved that problem, the next problem is that if you put ; two commands need to be …

Member Avatar for rubberman
0
174
Member Avatar for smidhunraj

i havae got a ubuntu machine .I typed in ftp in the command and it comes as ftp> then it ask for connection .I googled it and found that i have to give an address for it. Under one forum i found that the address lies in the /etc/hosts file …

Member Avatar for smidhunraj
0
139
Member Avatar for JonSmith

Hi, Can someone create a short code that will rename a files extension in a sub directory using a command line option -r? So if i have a file a.txt in folder called loc. I enter this "change -r txt doc" and the file will become a.doc in the loc …

Member Avatar for JonSmith
0
177
Member Avatar for bufospro

Hi all, I have a file .c and I would like to format the comments of file like that : /** Comment */ with a sed script The comments in my file is /* comment 1 */ /* comment 2 */ /** comment 3 */ I know to format file …

Member Avatar for thekashyap
0
79
Member Avatar for harish.tiruvile

I dont know shell scripting, It will be great help if someone help me in writing the script for below requirnment Requirnment: I have a file in which sql quires are written.I have to replace content of that file. sql file looks some what like below [CODE] #partial content of …

Member Avatar for thekashyap
0
106
Member Avatar for llocar

Hi. I'm wanting to append some information to a file, which is found in a different file. I have simplified the problem using animals. Here is the basic code to add the line to the file: [CODE]grep "some important info about rabbits" rabbits.data >> rabbits.txt[/CODE] Very simple, but this must …

Member Avatar for llocar
0
120
Member Avatar for gmdune

i, Here is the scenario I'm dealing with: My company has a bunch of old servers and workstations that have data on them that I need to copy to a "drobo" (multi-storage device) and eventually send the storage unit to someone else. I have a list of "contract numbers" that …

Member Avatar for gmdune
0
134
Member Avatar for bufospro

Hi, I use a command with awk in bash shell so as to extract info from a file. [CODE]awk -F'[=,: ]' '{print /uid=/?$4:(/^telephoneN/)?$2:$3}' 1.txt[/CODE] the output is something like aaaa bbbb cccc dddd eeee ffff gggg tttt I would like to write this output in a file 2.xml [CODE]<xml> <name>aaaa</name> …

Member Avatar for bufospro
0
102
Member Avatar for Frankey

Currently i am trying t figure out a simple straight forward way to back-up all the websites on my server to another server, with history/changes ( in a SVN way ). 1. I upload a file to the main server. 2. A second copy goes to the backup server. 3. …

0
85
Member Avatar for pichels

Hi- Was wondering if I could get help with a shell script I am writing to read in 10 -20 directories from a filesystem and then pause, press any key and then read in another 10 or 20 directories and pause again until I read them all. Here is my …

Member Avatar for cfajohnson
0
403
Member Avatar for virtue

Hi, I can not create executable code by using a makefile.How can I generate the executable code.I wrote this lines into my makefile and in the terminal I wrote make but I can not do it.Please help me. myprog : myprog.o mylibrary.o gcc myprog.o mylibrary.o -o myprog myprog.o : myprog.c …

Member Avatar for thekashyap
0
167
Member Avatar for weblover

Hello, i have a problem and need your help i have a text file generated automatically from a script , but the result in the script is not ordered in a readable way, so i need your help to fix it using a shell command the text file contain data …

Member Avatar for griswolf
0
106
Member Avatar for kmb90

Hello! Bit new to this and I am only scratching the surface on programming and scripting so forgive me if this is an overasked question! :) Or if this thread is in the wrong location. I am looking to trigger or autorun (not CD) a .bat to run/start by using …

Member Avatar for kmb90
0
134

The End.