10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line)... (4 Replies)
Discussion started by: express14
4 Replies
2. Shell Programming and Scripting
Hi!
I actually got it running, but I still would like to understand, why and how, since I am a beginner in bash scripting. I Need floating numbers and thus use bc in my bash script. Here it is:
#!/bin/bash
num1="10^-15" | bc -l #power function piped to bc - DOES NOT WORK
echo $num1... (4 Replies)
Discussion started by: McHale
4 Replies
3. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
4. Shell Programming and Scripting
Hello,
I try to concatenate a command to execute. Sadly it throws an error.
#!/bin/bash
cd /
cmd="find -name *.txt | awk '{ printf "FILE: "$1; system("less "$1);}' | egrep 'FILE:|$1'"
echo "1."
$($cmd)
echo "2."
$("$cmd")
echo "3."
`$cmd`
echo "4."
`"$cmd"`1.&3. 'find: paths must... (2 Replies)
Discussion started by: daWonderer
2 Replies
5. UNIX for Dummies Questions & Answers
Hi friends,
I have a file where I should search for a string and get the rest of the line but without the delimiter using awk.
for example I have the series of string in a file:
input_string.txt
bbb
ccc
aaa
and the mapping file looks like this.
mapping.txt
aaa|12
bbb|23
ccc|43... (11 Replies)
Discussion started by: kokoro
11 Replies
6. Shell Programming and Scripting
#! /bin/csh
set delimiter = |
foreach i (*)
set str_deli="$i$delimiter"
question: how to retain the value of str_deli so i can build a pipe delimited string?
end (1 Reply)
Discussion started by: jdsignature88
1 Replies
7. UNIX for Dummies Questions & Answers
Hi My friends
I have used this command to find files are modified within the past 24 hours
and then many files are shown but I want transfer all these files to special directory by using pipe .
can any one tell me what is the next step ? (11 Replies)
Discussion started by: bintaleb
11 Replies
8. Programming
i am new to linux programming. can anyone answer my question?
there is one pipe file "my_pipe"
prw-r--r-- 1 john rnd 32 Aug 17 19:45 my_pipe
how to output string message (char*) to this pipe? which API should I use? (3 Replies)
Discussion started by: princelinux
3 Replies
9. UNIX for Dummies Questions & Answers
current dir :
/home/sales
ls -l
abc.txt 17th aug
bcd .txt 16t oct
-------
------
Total files : 100
if i want to move only those files dated 17 aug into another sub directory /home/sales/texas
how do i pipe the result of 'ls' command to a 'mv' command (1 Reply)
Discussion started by: zomboo
1 Replies
10. UNIX for Advanced & Expert Users
Hi All,
I want to create a command that executes a text editor with the most recent file in the current current directory.
So a good start to achieve this is :
ls -lrt | cut -c55- | tail -1
which provides the name of the most recent file in a directory
The problem is to pipe the... (4 Replies)
Discussion started by: anonymous.nico
4 Replies