318 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Dev_9
Member Avatar for nikita.

Hi, i want to delete a column from a file. the file is like : 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 if i want to remove any column the outout should be like ( suppose 4): 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 i have used swk command, but its not …

Member Avatar for Liam Huang
0
2K
Member Avatar for RudyM

Hi all, I would like to replace new lines with "<BR>" in a text file. I'm executing the following line in Powershell: `[regex]::Replace((Get-Content "testfile.txt"), "\.``n", ".<BR>", "Singleline")` The contents of testfile.txt: Some text here for paragraph one. More text for paragraph two.

Member Avatar for RudyM
0
397
Member Avatar for shanenin

I don't understand why my function is not giving similar output as the first example of powershell code PS C:\Users\shane> $x = 3 PS C:\Users\shane> $y = 6 PS C:\Users\shane> $a = $x + $y PS C:\Users\shane> Write-Host "The answer is $a" The answer is 9 My function using similar …

Member Avatar for shanenin
0
334
Member Avatar for Azii

Hello, I have written the basic shell script "myscript.sh", which prints Hello World. I want to call this script using PL/SQL. Please let me know the procedure(steps) for the same. Thank you.

Member Avatar for Azii
0
1K
Member Avatar for Szabi Zsoldos

Hey guys, I have this script that does count one year of files, 2014, but when it comes to this year, everything messes up. How could I count properly for each year in the same script ? In the attached screenshot it's obvious that I would only need 2014 - …

Member Avatar for Watael
0
1K
Member Avatar for chubbyy.putto

I very new to C Shell. I am trying to do is read from Command line. Find the if the file is zip, .txt, symbloic link,pipe, unknow (if file is not zip, txt, sy....) here is what I what got so far. I am very stuck atm Please help me …

Member Avatar for chubbyy.putto
0
174
Member Avatar for Stuugie

Hi All, I'm working on a script which has a primary function to look for jpg files. I can get it to work if the folder path is just my desktop but if I try the start of the path to be C:\ it errors out. Right now the error …

Member Avatar for cgeier
0
411
Member Avatar for cjohnweb

Hello! I am normally in the PHP / Web Development section of DaniWeb. It's a pleasure to finally have a reason to check out other sections of DaniWeb! So, I am logged in as root at the Command Line Interface over SSH - on Debian 7 Wheezy running on a …

Member Avatar for cjohnweb
0
336
Member Avatar for changeworld4u

Hi Team, I have a file which contain following data like BKP0000032183140217000019 053IGZYEVSDOX .........field 2....... field3.....field4..... BKP0000032284140217000019CCTP1220 ............... BKP0000032384140217000019CA ..................... each line has 5 fields Now using shell script i am trying to extract field 4 based on condition that line start with BKP and contain code 84 and CA …

Member Avatar for changeworld4u
0
284
Member Avatar for Shreerang

Hey all, I was wondering if a web page could be opened in Mozilla Firefox using a shell script!..I haven't given it a try as yet...I will also try and if I find a a solution I'll definitely put it up....Till then if someone finds a solution or knows it …

Member Avatar for daye_1
0
4K
Member Avatar for Cap'nKirk

Hi all, I am having a play around with batch files but have hit a stumbling block. The file returns the contents of an image folder and outputs the results in html format as such: Thumbnail - Filename (usable link) - Creation Date - Modified Date Please bear in mind …

Member Avatar for Cap'nKirk
0
223
Member Avatar for lewashby

echo ${NUM:0:2} The above is just an example of the kind of code I'M using. I need a way to represent the end of the string. Is there a way to start from the right side of a line of text instead of the left? What I'M trying to do …

Member Avatar for cfajohnson
0
199
Member Avatar for timetraveller1992

I'm trying to get the date to work properly. The time is 5 pm (1700 hours) now i.e. evening but it always says morning. Here's my code currenthour="$(date "+ %-H")" echo $currenthour if [ $currenthour -gt '12' ] && [ $currenthour -lt '16' ]; then currenttimeofday="Afternoon" elif [ $currenthour -gt …

Member Avatar for cfajohnson
0
182
Member Avatar for zortar

xhi, my task is to make a script, which displays the string read from console input in the form of 1 letters / line only. my code looks like this so far read string hossz=`expr length "$string"` for i in `seq 1 $hossz` do echo `expr substr $string $i 1` …

Member Avatar for zortar
0
296
Member Avatar for theashman88

![3a451fbd93eb17f84f06c7ac648bdcab](/attachments/small/2/3a451fbd93eb17f84f06c7ac648bdcab.PNG "align-left") I need to create this program for class. I'm not looking for the answer. I'm simply confused on how to create a batch file where I input a number and it gives me an option. Would I use the IF command if so how would I do it. …

Member Avatar for brooks.johnson.54
0
371
Member Avatar for William_6

hello, I created a awk program to work witha data file to output a table and subtotal the rows and total up the collums and average I got it to work but when i added a presentation header before my totals go away. working code so far ------ can be …

Member Avatar for William_6
0
226
Member Avatar for hemanshurpatel

Hi, I need to fetch mail body from the local stored mailbox file. I'm using fetchmail and procmail to download emails from IMAP server and filterout unwanted one. From the list of emails, I want to process one by one and get their body and store it. the format of …

Member Avatar for hemanshurpatel
0
666
Member Avatar for rectifryer

I am currently trying to use the "find" command with symbollic links created by a tcl script that are pointing at another file in another directory (RH5). My script is written in bash, however: find /home/directory/subdirectory -name *.gz -type f -printf '%T@ %p\n' | sort -n | tail -n 1 …

Member Avatar for rectifryer
0
161
Member Avatar for leghorn

Hi I have a linux server with mysql installed.There is some data in mysql tables. Also.I have a .csv file (not from the aforementioned database) I need to compare the data in the database nad the .csv and print out the difference. I tried writing a shell script for that …

Member Avatar for leghorn
0
280
Member Avatar for Rahul47

I dont know what caused such a filenames and i am not able to remove these files. $ ls A????cd new????cat> >> A A????cd new????cat ????A Desktop Downloads file.sh menu.sh new new1.sh new.sh Pictures rename Videos A????cd new????cat |A A?echo A Documents even.sh filetest.sh Music new1.lst new.lst palindrome.sh Public Templates …

Member Avatar for Rahul47
0
201
Member Avatar for rje7

How to find the difference of two files and get a 3rd file with the newer information alone. for example: There are two files file1 and file2 **file1** apple mango pear **file2** apple mango pear cat and dog I need a file with **fileout** cat and dog how to achieve …

Member Avatar for rje7
0
152
Member Avatar for duke.tim

Why is it that no matter how long I put the sleep command or loop, cat is unable to read the file, even though the file already exsists? Is there any way of reliably waiting for the whois to finish, write to file and then read that the file exsists?? …

Member Avatar for duke.tim
0
240
Member Avatar for mossman mudas

i have an awk script and in the end section i create my table data with printf and i want to sort it so i used pipe then sort i am calling it like this awk -f awkscript file in bash i can get it to work the way i …

Member Avatar for mossman mudas
0
236
Member Avatar for m_ishwar

Hello everyone. I am trying to compile this simple code using gcc under Cygwin terminal. //A function that just returns a value// int my_function() { return 0xbaba; } I saved the code as basic.c I issue the command $gcc basic.c in the Cygwin terminal And I get the error: gcc: …

Member Avatar for m_ishwar
0
606
Member Avatar for Rahul47

vi is basically used independently .....but what if vi commands are used in shell script ? I am trying to accomplish functionality of mv command using a shell script. what I want is to yank whole text of one file1 and paste it in file2. this all should happen in …

Member Avatar for Watael
0
254
Member Avatar for lewashby

I'M wanting to write my own command/script for compiling my c++ files. I use g++ -g -Wall filename.cpp -o filename I'M trying to figure out how I can trip of the last four characters (.cpp) from a string. Any ideas?

Member Avatar for rojomoke
0
245
Member Avatar for old_apache

i have 2 files, one file created on Windows and another was made on Ubuntu, i want to use this command: comm -12 file1 file2 how do i do that?

Member Avatar for old_apache
0
183
Member Avatar for old_apache
Member Avatar for mossman mudas

i want to find the total space used for the files owned by me from my current directory. i have du -sh `find ./ -user $USER -type f` which gives 8.0K ./.a 8.0K ./t 4.0K ./cat/A 4.0K ./a using -s has no effect. using du -sh by itself includes the …

Member Avatar for mossman mudas
0
149

The End.