10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have prepared a script with ls -t to fetch latest file and compare with duplicates i use below
ls -t *xml |awk 'BEGIN{FS="_"}{if (++dup >= 2) print}'
However for large size folder ls command not working. so i tried with
find ./ -type f \( -iname "*.xml" \) | sort |awk 'BEGIN{FS="_"}{if... (2 Replies)
Discussion started by: gold2k8
2 Replies
2. Shell Programming and Scripting
i have data that can look like this:
echo "Master_Item_Service_is_down=0_njava_lang_NoClassDefFoundError=0_njava_lang_OutOfMemoryError=1_nemxCommonAppInitialization__Error_while_initializing=0_nINFO__Stopping_Coyote_HTTP_1_1_on_http_8080=7_nThe_file_or_directory_is_corrupted_and_unreadable=0_n" ... (7 Replies)
Discussion started by: SkySmart
7 Replies
3. Shell Programming and Scripting
The below hides the messy commands of wget
#!/bin/bash
cd 'C:\Users\cmccabe\Desktop\wget'
wget -O getCSV.txt http://172.24.188.113/data/getCSV.csv
progressfilt ()
{
local flag=false c count cr=$'\r' nl=$'\n'
while IFS='' read -d '' -rn 1 c
do
if $flag
... (5 Replies)
Discussion started by: cmccabe
5 Replies
4. Shell Programming and Scripting
Hi
I'm trying to write a shell script which finds all the .zip files in a given directory then lists them on the screen and prompts the user to select one by entering a number e.g.
The available files are:
1. HaveANiceDay.zip
2. LinuxHelp.zip
3. Arrays.zip
Please enter the... (4 Replies)
Discussion started by: zX TheRipper Xz
4 Replies
5. Shell Programming and Scripting
Need a script to print a set of characters in different combination. What's the key to accomplish this.
e.g charset: "Abcdefghij1" without quotes.
block 1: "Abcd"
block 2: "efg"
block 3: "hij1"
I need this script to change the order of the characters and print it to stdout
e.g
print out... (3 Replies)
Discussion started by: zaonline
3 Replies
6. HP-UX
Hi,
I am doing some testing with creation of depots on HP-UX systems (11.11).
Want to display some echo statements based on the processing during checkinstall, pre & postinstall scripts on the terminal.
The echo statements are getting directed to /var/adm/sw/swagent.log
I want to display... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies
7. Shell Programming and Scripting
Hi,
I wanna format the output in find to be like this :
NUM SIZE TYPE NAME
1 942080 DIR ./a/b/CaChE.xyz
2 888832 FIC ./a/b/core.1234
3 389120 FIC ./a/b/core.12
4 229376 FIC ./xxx/xyz.bak.cache
I don't know if its possible.
For... (1 Reply)
Discussion started by: naminator
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all, why does one version of this command work but not the other?
- This file already exists with 644 mod permissions
- I am logged in as d269836, no su rights.
- Box is 'SunOS' running bash I think; but runs ksh scripts OK.
This one works:
find /users/d269836 -type f -name "*.txt"... (6 Replies)
Discussion started by: dan-e
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am confused about the output of find command.
Please see the two find commands below.
When i put "*.c" i get lots of files. But when i put *c only i get only one file.
Any answer??
$ find . -name "*c"
./clarify/cheval/hp_server/rulemanager/rulemansvc... (3 Replies)
Discussion started by: shriashishpatil
3 Replies
10. UNIX for Dummies Questions & Answers
I have a find command that finds all files in a folder older than 6 days
i.e
find . -name "hourly.*" -mtime + 6
This gives me an output
/oralogs/.snapshot/hourly.0
/oralogs/.snapshot/hourly.1
/oralogs/.snapshot/hourly.2
I would like the output to be
hourly.0
hourly.1... (5 Replies)
Discussion started by: NeerajSingh
5 Replies