1,978 Topics

Member Avatar for
Member Avatar for nakresimin

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

Member Avatar for JeoSaurus
0
85
Member Avatar for RobotFX

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 …

Member Avatar for RobotFX
0
113
Member Avatar for PyroPlasm

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 …

Member Avatar for histrungalot
0
169
Member Avatar for sudhanshu12788

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.

Member Avatar for deepkw
0
212
Member Avatar for woodson2

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 …

Member Avatar for L7Sqr
0
102
Member Avatar for msrikanth

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 …

0
77
Member Avatar for Aamit

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 …

Member Avatar for thekashyap
0
853
Member Avatar for LRNPHP

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 …

Member Avatar for LRNPHP
0
124
Member Avatar for koricha

can some body expaly me this command [CODE]sed -e 's/<[^>]*>//g' test > test.t [/CODE] thank you

Member Avatar for koricha
0
176
Member Avatar for java_programmer

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" …

Member Avatar for java_programmer
0
193
Member Avatar for msrikanth

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 …

Member Avatar for histrungalot
0
7K
Member Avatar for whizkidash

Hi Team, I am new to shell script. Do kindly help me remove junk character from a file having a million records.. As it is production setup do kindly advice Thanks ... Whizkidash

Member Avatar for saumitra11
0
264
Member Avatar for raul8

Hi, I simply want to append a string at the end of another string. But instead, it is replacing in the beginning. [CODE]#!/bin/bash str1="/user/test" echo $str1 echo ${str1}/program[/CODE] I tried other techniques too but same result

Member Avatar for Fest3er
0
133
Member Avatar for blackarchan

Oke so i want to make a script that automaticaly install some apps adds some lines to some files replace some lines from files For the install i use apt-get -y install packagename For adding line im using : [CODE]sudo sh -c 'echo "#Name" >> /etc/apt/sources.list' sudo sh -c 'echo …

Member Avatar for blackarchan
0
164
Member Avatar for kalyanilinux

Hello.. I wrote the following shell script to run disk quotas for assigning limits to users. I need to know the partition which the user has created and mount it. So i copied the partitions (which will be displayed after running fdisk -l) and separted the last line from it …

Member Avatar for histrungalot
0
160
Member Avatar for niyasc

This is the question appeared in our sessional exam related to shell programming What do you mean by $?,$#,$* and $$. Can anyone help me to answer this question?

Member Avatar for adrianfrederic
0
89
Member Avatar for diocode

I'm looking for a command or bash script that will create an index.html file in every directory and subdirectory starting at the current directory. I would like it to prompt to overwrite so I don't delete a good index.html file.

Member Avatar for cfajohnson
0
151
Member Avatar for karthickk02

I have a script file that file type is ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs) Now I want to get the contents of this file. How can I ? Any help me to get cotents of this file type?

Member Avatar for L7Sqr
0
94
Member Avatar for Sundown G

I post this on C too... Well, my program read all lines from (plain.txt) and save temporary every read strings line by line into another text called(all.txt), i made the md5sum hash on each line separately of (all.txt) and saving this hashes on calculating.txt... then delete the all.txt and calculating.txt, …

Member Avatar for Sundown G
0
171
Member Avatar for tap3ah

Can anyone help me with this, please: This code works as intended: [CODE]eval "$(date "+yr=%Y mh=%m dy=%d hr=%H mt=%M sd=%S")" echo "year=$yr ; month=$mh ; day=$dy ; hour=$hr ; minute=$mt ; second=$sd"[/CODE] It gives output [CODE]year=2012 ; month=02 ; day=09 ; hour=14 ; minute=30 ; second=17[/CODE] on stdout. This code …

Member Avatar for tap3ah
0
152
Member Avatar for Sundown G

Hey im new in this.. I want to search the user input in file (by lines) but not all then with this line search on another file ( with the specific line) and show to the user. Example: file1.txt ======= a aa aaa aab aac file2.txt (corresponding md5 hashes of …

Member Avatar for Sundown G
0
583
Member Avatar for Sundown G

I post this thread in shell scripting too I want to search the user input in file (by lines) but not all then with this line search on another file ( with the specific line) and show to the user. Example: file1.txt ======= a aa aaa aab aac file2.txt (corresponding …

0
87
Member Avatar for geoffy0404

Hello I have something for my scripting class I am assigned to do, I can not figure out who to do these set of instructions, I beleive i am supposed to use the tr command, he has 'cut file | tr ":" " " ' on the board. i am …

Member Avatar for L7Sqr
0
153
Member Avatar for iparkin

I recently ran the following command from the command line and it worked find . -name '*jrAPS*_ouput.log' -exec grep '<string expression>' {}\; -print I put it in a shell script like this and it did not work find . -name '*jrAPS*_output.log' -exec grep '<string expression>' {} \\\; -print the result …

Member Avatar for borlam
0
572
Member Avatar for Icostyle

Shell Script Tasks This is a homework assignment to create the below described shell scripts. I need the scripts so I can complete my university education. If you would like to help me and can create these scripts, please send them in a zip or rar file to my email: …

Member Avatar for zachmandude32
0
213
Member Avatar for Ismatus3

Hello all friends , i'm biginner in scripting , i just wanted to send i folder to a distant machine ising scp , without writing the password of the distant machine in terminal .For that , i found a script which is :[CODE]#!/usr/bin/expect -f # effectue le transfert par SCP …

0
74
Member Avatar for JavaPrograms

shell-scripting @ DaniWeb - Hello fellow members, I would like to ask for your assistance in creating a batch/autorun/exe file which can help me to make an autorun usb. So basically, I would like the USB to do the following: When usb is inserted, it should autorun and copy files …

Member Avatar for technoknol
0
798
Member Avatar for garyrickert

I have a bunch of scripts that get data from a number of systems to analyze / report against. Up to now I have been taking the output to the screen and just copy/pasting into a file. I am now trying to send directly to files, but when I try …

0
96
Member Avatar for ajai.solinfi

Hi ALL, Can any one suggest me on below requirements with less memory and cpu time. I have used below code and seems it is not efficient for huge files. fgrep -v -f file2 file1 >file3 This will output file3 containing all lines from file1 that are not in file2. …

Member Avatar for ajai.solinfi
0
264
Member Avatar for Staric

I was dragging and dropping flv files onto this bat file so I could watch in fullscreen on my second monitor:[CODE]set vlcPath="C:\Program Files\VideoLAN\VLC\vlc.exe" %vlcPath% %1 --video-x=1366 --video-y=768 --width=300 --height=300 --fullscreen --no-video-title-show --no-embedded-video --no-qt-fs-controller[/CODE] but would rather write a batch file with a menu so I could simply select the video …

0
152
Member Avatar for msrikanth

Hi Everyone, I have written a C Shell wrapper script for "cat" command in the linux such that whenever any uses the "cat" command and it logs to some file, so the script is as #!/bin/tcsh -f set command = /etc/temp/cat set logfile = /etc/cat_command.log echo "$LOGNAME + $command $argv …

Member Avatar for msrikanth
0
589
Member Avatar for swebdizajn

I have a question for all you experts who have had similar experiences as me: Is there a solution for this malware on the site? An infection on the Linux server, where we're constantly in the Wordpress script generates files of type wb 5433712.php antimalware program is a malware called …

Member Avatar for Habitual
0
1K
Member Avatar for marirs07

Hi all, I would like to call a makefile with a particular variable and value so that the variable is used to make decisions inside the makefile. Thanks

Member Avatar for L7Sqr
0
154
Member Avatar for fatalaccidents

Hey guys, I know this is a simple question but one that I can't quite figure out. I find myself copying to a directory a lot and then wanting to go there. I don't know if bash has anything build in or I would have to create a script, but …

Member Avatar for fatalaccidents
0
243
Member Avatar for tap3ah

I'm trying to write a bash script that converts html file into latex file by processing each line with sed. I'm stuck with following issue: I need to replace [ICODE]<a name="[I]something[/I]">[/ICODE] with [ICODE]\index{[I]something_else[/I]}[/ICODE]. I have an associative array with key-value pairs like this: [ICODE]"[I]something[/I]" => "[I]something_else[/I]"[/ICODE]. However, there are 2 …

Member Avatar for tap3ah
0
194
Member Avatar for PyroPlasm

Hello, I am fairly new to shell scripting. I see a lot of examples out there of how to find if a file has been modified within a certain period of time. What I'm looking for help with is a script that will run and I'm thinking check for the …

Member Avatar for shibblez
0
148
Member Avatar for steve_kamlp

Hi! I need a shell script for Linux. It must show me the "window title" from process id (PID). I found something here but it does not work: [url]http://blog.chewearn.com/2010/01/18/find-window-id-of-a-process-id-in-bash-script/[/url] I will be happy if somebody can help me. Thnak you!

Member Avatar for Habitual
0
92
Member Avatar for matharoo

I am trying to plot a graph using expect in my script and want to change the range of x and y axis. my script processes all the commands but when it comes to axis([1 5 1 10], 'normal']) command it give out the error following error : [CODE]octave:1> x …

Member Avatar for matharoo
0
209
Member Avatar for vip011

HI EVERYONE I would be grateful if someone could help me solving the problem with my CSH file. I am running a simulation which runs with the qsub line in the CSH file and is followed by number of parameter which is required to run the program. But before this …

Member Avatar for cfajohnson
0
166
Member Avatar for maurya10
Member Avatar for matharoo

Hi I am trying to write a script in Bash Shell. I have the file test.txt and has the following data: AIR DR [ 4] Pressure :50 AIR UR [ 3] Pressure :70 WATER DR [ 3] Pressure :90 [ 3] PIS: 402ps WATER UR [ 3] Pressure :110 [ …

Member Avatar for L7Sqr
0
328
Member Avatar for manpreet87

Hi, Each line of file contains a timestamp value(ex: 2012-01-16 14:43:23) which denotes the time at which a particular action was performed. I want to extract the logs for all the actions performed in the last 2 hours using awk. That is, where timestamp should greater currentTime - 2 hours …

Member Avatar for L7Sqr
0
119
Member Avatar for Icostyle

Hello, I need the answers for these questions please. Thank you very much. 51. What is the major number for LVM DSFs using disk layout 1? A. 32 B. 64 C. 128 D. 256 52. If vg05 has two logical volumes created using the default naming convention, overall, how many …

Member Avatar for L7Sqr
0
109
Member Avatar for rockyada

hello I have this command that i am calling from php (exec()): [CODE]openssl pkcs12 -export -in cert.pem -inkey key.pem -out cred.p12[/CODE] and then i need to insert password twice Enter Export Password: Verifying - Enter Export Password: I need script that will fill the password inputs, do you have any …

Member Avatar for ennoil
0
119
Member Avatar for rahulroshan

Hi I want to count number of lines in csv files in a folder and display it, I have the code to count number of lines,but the problem is i want to loop all the files in that folder and display it , For eg: in Month January folder ,I …

Member Avatar for ennoil
0
186
Member Avatar for Azmah

I'm looking for a decent directory scripts. I've looked at clones, free and commercial. The commercials look promising but am not sure if they really are worthit. I really need to be able to edit the theme/template and wouldn't mind if there were a plethora of themes available. Are there …

Member Avatar for pritaeas
0
195
Member Avatar for aamitrhce

Hi All, Need to Analyze Zimbra Mail server sync.log through shell script Required output from sync.log Total Number of Users : Total Number of Device ID: Total Number of Device Type with Version : Below is Sample of Log File : 2009-12-16 00:00:43,970 INFO [btpool0-12194://webmail.amit.com/Microsoft-Server-ActiveSync?Cmd=Ping&User=rahul%40kke.amit.com&DeviceId=androidc986729649&DeviceType=Android] [] sync - POST Microsoft-Server-ActiveSync?Cmd=Ping&User=ritesh%40kke.amit.com&DeviceId=androidc986729649&DeviceType=Android …

Member Avatar for L7Sqr
0
340
Member Avatar for gcclinux

Hello, I was wondering if you can help me, I am tryin gto achieve a specif output and I am stuck, any help would be greatly appreciated. [CODE]# cat file 1,2,3,4,5,6 1,,3,4,5,6 1,2,,,,6 # cat file | awk -F, '{print $1,$2,$3,$4,$5,$6}' | awk '{printf("%-1s %2s %2s %2s %2s %2s\n", $1, …

Member Avatar for Fest3er
0
164
Member Avatar for sandip.bhoi

Dear All, I have just started, playing with unix shell programming. I am in need to know, that how to get the position of cursor at unix shell. To set the cursor position i am using command # tput cup x y

Member Avatar for dethrophes
0
202
Member Avatar for vignesh viki

i need to print the file names of all files having .txt extension of a given directory after converting to uppercase letters. The input (directory name) should be given as command line argument. The script will also check whether sufficient arguments are passed or not and whether the argument is …

Member Avatar for L7Sqr
0
101

The End.