1,891 Topics
| |
I am new to bash shell scripting. Converting over to Linux before support for Windows XP fades into the sunset, I am redesigning and rewriting many scripts that worked using enhanced scripting language Take Command. I am trying to evaluate whether a directory exists based on a list of directories … | |
Been a long time since I've logged in and had a question, but here goes nothing! I have a file that is not delimited in any way, but I need to replace a particular column character from a space to a alphanumeric value on every other line starting at line … | |
Hi, I'm running a script to bring down the logical ip address . But if the system doesnt have that logical ip addresss then i get the following error print on terminal - SIOCSIFFLAGS: Cannot assign requested address I just want to know whether there is a way to suppress … | |
Hey guys, I recently had an assignment to write a sort algorithm we have not yet gone over in class. I had no problem getting my code written and to compile, but now that it compiles I keep getting an error that says "Exception in thread "main" java.lang.NoSuchMethodError: main" I … | |
Hello everyone, I am trying to read in a folder path, delimited by / and ending in COSC, and then output the last field to a file. It is supposed to match all directories that end in a course name, for example, COSC-101 or COSC201. I am using the following … | |
Hi people! I just want to get the sum, max number, average and multiplication of array with n numbers! I already make the sum, but I tried different operators, ways for others and I can't get the another task without errors! Any help! Im really noobie on this Look! #!/bin/bash … | |
I'm doing a program where I need user to enter the name of a text file. I want him to be able to see the path if he enters pwd. Right now this is very OS related and only works on Mac OS(I guess). So I have done string real; … | |
I am new to bash scripting. Is it possible to get a value returned on a nested variable? At the command line, the following code will generate desired ouput: while read line; do echo -e "${line:21}"; done < Albums-linux.txt It takes a list of directories for albums and returns a … | |
Hope my first post is relevant enough. I'm a newbie coder and this is as much a learning exercise as it is a favor for my girlfriend. She has test results from a device that outputs data to .csv in multiple (100+) files. the important data is the separate file … | |
Hi Friends, I need to some help in connecting to webserver using c shell or tcl scripting in linux ie in my office in linux system we have some intranet which is run by tomcat server so i need to connect to that server and read some data existing in … | |
I am writing a simple DHCP server application that gets ip from a server at boot up ! i wrote a shell script to run the java program that obtains ip from server on another machine... The problem is when i have obtained the ip i store it in a … | |
Hi All, I want to pass few dynamic arguments to shell script. The number of arguments differ each time I call the script. I want to print the arguments using the for loop as below. But not working out. for (( i=1; i<=$#; i++ )) do echo $"($i)" done /bin/sh … | |
Hi All, I want to pass few dynamic arguments to shell script. The number of arguments differ each time I call the script. I want to print the arguments using the for loop as below. But not working out. for (( i=1; i<=$#; i++ )) do echo $"($i)" done /bin/sh … | |
Hi I have a file with duplicate records they look something like this: [ICODE]<record> <dateadd>012012</dateadd> <nid>R04607295</nid> <reflink></reflink> <FPI>YES</FPI><TPG>NO</TPG><FT>YES</FT> <num>631</num> <author>Anon</author> <title>ON THE WED</title> </record> <record> <dateadd>012012</dateadd> <idref>R04607297</idref> <reflink></reflink> <type>Article</type> <FPI>YES</FPI><TPG>NO</TPG><FT>YES</FT> <num>651</num> <author>Bent, E</author> <title>ENTRANCES AND EXITS</title> </record> <record> <dateadd>012012</dateadd> <nid>R04607295</nid> <reflink></reflink> <FPI>YES</FPI><TPG>NO</TPG><FT>YES</FT> <num>631</num> <author>Anon</author> <title>ON THE WED</title> </record> <record> <dateadd>012012</dateadd> … | |
Hello everyone, Is been a while since i've been trying to rename a file using the ren batch command, but for some reasons is not working for me. could some one please give me an idea on how to reanme a file with a batch file? Thanks in advance. This … | |
I have written a very simple bash script that runs on Solaris10. It runs a command and then sends me the output via mailx. I can run it at the command line (sudoed as root) and it runs perfectly fine. I then set it up to run from root's cron. … | |
Hey guys, I was doing some basic bash shell script, as I am new to this, and I can't seem to pass over this error. Here is the code: [CODE] #!/bin/bash echo "Please, type in the day of the week." read Day if (($Day="Monday"));then Monday=date +%d Tuesday=$(($Lunes+1)) Wednesday=$(($Martes+1)) Thursday=$(($Miercoles+1)) Friday=$(($Jueves+1)) … | |
Hi, I Want a shell script, when i run it should print the current row & column number of the terminal in which is invoked , so how can i get the current row & column number in the linux . Thanks Srikanth M. | |
I was trying to run a shell script and run it through Cygwin terminal in XP environment. The script I have written is as follows - [CODE]#!/bin/bash read -p "Enter Your name - " fname if test "$fname" == "abcd" then echo "Thank you abcd" fi[/CODE] When I am trying … | |
is it possible to empty all the tables in the database without dropping them with shell script? if yes could you please show me? thank you | |
Well, I hope this is the right forum, first of all. Here's my issue: I have a lot of images stored in subfolders like this example: [I]/Stallone/photos[/I] or [I]/Aguilera/photos[/I]. I'd like to move all the images from the [I]photos[/I] folders one folder up, if possible. I'm hoping maybe there's a … | |
I have a shell script that is outputting from a database. What is coming from the DB is this: ----------- 50 (1 rows affected) The issue that I have is there is an if statement in my script that looks at the first line and reads the number there. Unfortunately … | |
Hi, I want to read a file from the command line and remove all the spaces, tabs in it, replacing it with comma(,), and write it to a new file. can you help me out with this scenario. | |
I'm trying to enter a block of text into an existing configuration file for OpenLDAP so the setup can be fully scripted. The text below is what I want to enter into slapd.conf and this all works well and good, however as you probably know this will place the text … | |
Hi Everyone, I need some help in Tcl Tk Gui Application Development. In that GUI i need 2 drop down lists 1) Subject : , so here a list of subjects will be present 2) Assignment : , So here depending upon the subject again a list of assignments related … | |
Hi, [code] check_time() { fileName=$myFileName newTime=$line newtimeaccess="date --date \"$newTime 6 hour\" '+%Y-%m-%d %H:%M:%S'" newtimeaccess=`echo $newtimeaccess | sh` strnewtime=$(date -d "$newtimeaccess" +%s) systime=$(date +%s) if [ $systime -le $strnewtime ] then return "$fileName__0"; else return "$fileName__1"; fi } value=`check_time "$myFileName $line"` ##$myFileName -- file name and $line -- time of file … | |
Hi All, I'm going crazy with this. I have a file called unique.txt with allot of values in. When I run my script it will add 1 value (1319613308.476855) to my value file but when I grep the value it displays nothing and I know the value is present in … | |
can some body expaly me this command [CODE]sed -e 's/<[^>]*>//g' test > test.t [/CODE] thank you | |
I am trying to write a shell script which will read a file and counts the number of vowels in the file. The code which read the file is as follows - [CODE]while read -n 1 c do l=$(echo $c | tr [:upper:] [:lower:]) [[ "$l" == "a" || "$l" … | |
Hi Everyone, I need a replace a string (ex : this) with the string (ex : that) in each line of a file (sample.txt) using a C Shell Script and I am not allowed to use sed,awk and replace command in the unix , So i tried to use tr … |
The End.